Submission #1740619


Source Code Expand

Copy
K = int(input())

def digit_sum(n):
    s = str(n)
    ret = 0
    for i in s:
        ret += int(i)
    return ret

ans = digit_sum(K)
for i in range(1,10):
    ans = min(ans,digit_sum(i*K))

print(ans)

Submission Info

Submission Time
Task D - Small Multiple
User TAB
Language C++14 (GCC 5.4.1)
Score 0
Code Size 218 Byte
Status

Compile Error

./Main.cpp:1:1: error: ‘K’ does not name a type
 K = int(input())
 ^