Submission #147159

#TimeUsernameProblemLanguageResultExecution timeMemory
147159jh05013팩토리얼 세제곱들의 합 (YDX14_fact)Cpython 3
1 / 1
30 ms3428 KiB
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 timeMemoryGrader output
Fetching results...