CSES - Putka Open 2020 – 2/5 - Results
Submission details
Task:Torni
Sender:habla02
Submission time:2020-09-26 10:01:19 +0300
Language:CPython3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
Test results
testverdicttimegroup
#1--1, 2, 3details
#2--2, 3details
#3--3details

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:

input
10
1
2
3
4
...

correct output
2
8
34
148
650
...

user output
(empty)

Test 2

Group: 2, 3

Verdict:

input
100
1
2
3
4
...

correct output
2
8
34
148
650
...

user output
(empty)

Test 3

Group: 3

Verdict:

input
100
996306
650655
896240
821967
...

correct output
87350005
606189151
122595036
193572715
227926807
...

user output
(empty)