CSES - KILO 2016 0/5 - Results
Submission details
Task:Product
Sender:Artur Gynter
Submission time:2016-09-05 19:46:59 +0300
Language:Python3
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.08 sdetails
#2ACCEPTED0.07 sdetails
#30.07 sdetails
#40.06 sdetails
#50.06 sdetails
#60.07 sdetails
#70.06 sdetails
#80.06 sdetails
#90.07 sdetails
#100.07 sdetails
#110.07 sdetails
#120.07 sdetails
#13ACCEPTED0.31 sdetails

Code

import math
n = input()
ab = input()
sum = 1

for obj in ab.split(" "):
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
    sum *= int(obj)

Test details

Test 1

Verdict: ACCEPTED

input
5
5 2 3 2 6

correct output
5 10 30 60 360

user output
5 10 30 60 360 

Test 2

Verdict: ACCEPTED

input

100000 100000 1000000000 2

correct output
100000 999999937 490 980

user output
100000 999999937 490 980 

Test 3

Verdict:

input
69
17 9 3 19 16 7 13 18 4 13 1 2 ...

correct output
17 153 459 8721 139536 976752 ...

user output
17 153 459 8721 139536 976752 ...

Test 4

Verdict:

input
55
6 8 7 5 3 9 14 3 17 16 20 14 1...

correct output
6 48 336 1680 5040 45360 63504...

user output
6 48 336 1680 5040 45360 63504...

Test 5

Verdict:

input
98
6 4 13 10 19 2 16 20 13 9 2 1 ...

correct output
6 24 312 3120 59280 118560 189...

user output
6 24 312 3120 59280 118560 189...

Test 6

Verdict:

input
3706
415250715 515842601 541103121 ...

correct output
415250715 393281666 415038041 ...

user output
415250715 393281679 367762355 ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 7

Verdict:

input
27123
340378004 925026654 769754608 ...

correct output
340378004 931307555 908315508 ...

user output
340378004 931307531 305721153 ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 8

Verdict:

input
9330
243816047 71026988 682652566 4...

correct output
243816047 323253803 542518246 ...

user output
243816047 323253803 785381422 ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 9

Verdict:

input
100000
147668716 175218058 331749062 ...

correct output
147668716 463753953 829592527 ...

user output
147668716 463753953 710831743 ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 10

Verdict:

input
100000
50298704 638426282 461382979 7...

correct output
50298704 359354430 269646858 6...

user output
50298704 359354430 58077866 21...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 11

Verdict:

input
100000
294118419 779666009 167430885 ...

correct output
294118419 309920847 329927348 ...

user output
294118419 309920852 330460671 ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 12

Verdict:

input
100000
1000000000 1000000000 10000000...

correct output
1000000000 49 999999664 2401 9...

user output
1000000000 49 287554638 735048...

Error:
Traceback (most recent call last):
  File "input/code.py", line 7, in <module>
    print(int((int(obj) * sum) % (math.pow(10, 9)+7)), end = " ")
OverflowError: int too large to convert to float

Test 13

Verdict: ACCEPTED

input
100000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

user output
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...