Submission #147160

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