n = int(input()) k = int(input()) if k == 1: print(598062830368207350) else: sm = 0 for i in range(k, n + 1, k): sm += i print(sm)
nn
if test à?
gà quá:
var n,k: longword; begin readln(n,k); dec(n,n mod k); write((n+k)*((n-k) div k+1) div 2); readln end.
Bình luận
nn
if test à?
gà quá: