Task: | Torni |
Sender: | habla02 |
Submission time: | 2020-09-25 20:52:36 +0300 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | TIME LIMIT EXCEEDED | 0 |
#2 | TIME LIMIT EXCEEDED | 0 |
#3 | TIME LIMIT EXCEEDED | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | TIME LIMIT EXCEEDED | -- | 1, 2, 3 | details |
#2 | TIME LIMIT EXCEEDED | -- | 2, 3 | details |
#3 | TIME LIMIT EXCEEDED | -- | 3 | details |
Code
#n = int(input('Anna luku')) def facto(n): prod = 1 for k in range(2,n+1): prod = prod * k % ((10**9)+7) return prod def binom(n, k): return (facto(n)/(facto(k)*(facto(n-k)))) def torni(t): koko = 0 for i in range(0,t+1): x = ((binom(t,i))*2*((t-i)**2)) koko = koko + x koko = koko-t-1 return koko if __name__ == '__main__': print(torni(6)) print(binom(2000,258)) print(torni(2864))
Test details
Test 1
Group: 1, 2, 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
10 1 2 3 4 ... |
correct output |
---|
2 8 34 148 650 ... |
user output |
---|
(empty) |
Test 2
Group: 2, 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
100 1 2 3 4 ... |
correct output |
---|
2 8 34 148 650 ... |
user output |
---|
(empty) |
Test 3
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
100 996306 650655 896240 821967 ... |
correct output |
---|
87350005 606189151 122595036 193572715 227926807 ... |
user output |
---|
(empty) |