# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147160 | jh05013 | 팩토리얼 세제곱들의 합 (YDX14_fact) | Cpython 3 | 37 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: print(str(n+1).rstrip('0')[-1])
elif n <= 3: print([[], [1,2,4,1], [1,2,6,2], [1,2,1,6]][k][n])
else: print([0,4,8,5][k])
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |