답안 #27199

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
27199 2017-07-10T12:38:22 Z TAMREF 팩토리얼 세제곱들의 합 (YDX14_fact) Python 3
0 / 1
31 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()
# 결과 실행 시간 메모리 Grader output
1 Correct 27 ms 3 KB answer is '4'
2 Correct 27 ms 3 KB answer is '2'
3 Correct 30 ms 3 KB answer is '2'
4 Correct 29 ms 3 KB answer is '2'
5 Correct 29 ms 3 KB answer is '2'
6 Correct 27 ms 3 KB answer is '4'
7 Correct 26 ms 3 KB answer is '6'
8 Incorrect 31 ms 3 KB 1.0 is not a valid integer
9 Halted 0 ms 0 KB -