Task: | Torni |
Sender: | habla02 |
Submission time: | 2020-09-26 10:01:19 +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
import math from decimal import * def binom(n, k): x = math.factorial(n) // math.factorial(k) // math.factorial(n - k) return x def torni(t): koko = 0 for i in range(0,t+1): koko += ((binom(t,i))*2*((t-i)**2)) koko = koko-t-1 tulos = koko%((10**9)+7) return tulos if __name__ == '__main__': print(torni(6)) print(torni(2864)) print('') print(binom(200000,12518))
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) |