# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
27200 | TAMREF | 팩토리얼 세제곱들의 합 (YDX14_fact) | Cpython 3 | 39 ms | 3 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.
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 |
---|---|---|---|---|
Fetching results... |