# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147159 | jh05013 | 팩토리얼 세제곱들의 합 (YDX14_fact) | Cpython 3 | 30 ms | 3428 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
n, k = map(int,input().split())
if k == 0:
n+= 1
while n%10 == 0: n//= 10
print(n%10)
elif k == 1:
if n <= 3: print([1,2,4,1][n])
else: print(4)
elif k == 2:
if n <= 3: print([1,2,6,2][n])
else: print(8)
else:
if n <= 3: print([1,2,1,6][n])
else: print(5)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |