BOJ - 1834 - 나머지와 몫이 같은 수

Updated:

def solution():

    N = int(input())
    ret = 0

    for i in range(N):
        ret += N * i + i
    
    print(ret)

solution()

https://www.acmicpc.net/problem/1834

Categories:

Updated:

Leave a comment