Submission #27200

# Submission time Handle Problem Language Result Execution time Memory
27200 2017-07-10T12:38:54 Z TAMREF 팩토리얼 세제곱들의 합 (YDX14_fact) Python 3
0 / 1
39 ms 3 KB
def main():
    n,k=list(map(int,input().split()))
    S=0
    fact=[1,1,2,6,24]
    for i in range(0,min(n,4)+1):
      S+=fact[i]**k
    print(S%10) if S%10 else print((S//10)%10)
main()
# Verdict Execution time Memory Grader output
1 Correct 28 ms 3 KB answer is '4'
2 Correct 25 ms 3 KB answer is '2'
3 Correct 25 ms 3 KB answer is '2'
4 Correct 28 ms 3 KB answer is '2'
5 Correct 26 ms 3 KB answer is '2'
6 Correct 27 ms 3 KB answer is '4'
7 Correct 25 ms 3 KB answer is '6'
8 Correct 27 ms 3 KB answer is '1'
9 Correct 26 ms 3 KB answer is '2'
10 Correct 27 ms 3 KB answer is '6'
11 Correct 30 ms 3 KB answer is '4'
12 Correct 25 ms 3 KB answer is '5'
13 Correct 39 ms 3 KB answer is '2'
14 Correct 30 ms 3 KB answer is '3'
15 Correct 28 ms 3 KB answer is '4'
16 Correct 25 ms 3 KB answer is '5'
17 Incorrect 24 ms 3 KB expected '6', found '5'
18 Halted 0 ms 0 KB -