| Task: | Kyselyt |
| Sender: | hgg9 |
| Submission time: | 2017-10-09 13:56:23 +0300 |
| Language: | Python3 |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | RUNTIME ERROR | 0 |
| #2 | RUNTIME ERROR | 0 |
| #3 | RUNTIME ERROR | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | RUNTIME ERROR | 0.08 s | 1 | details |
| #2 | RUNTIME ERROR | 0.07 s | 2 | details |
| #3 | RUNTIME ERROR | 0.07 s | 3 | details |
Code
def read_ints(filename='input.txt'):
with open(filename, mode='r') as filein:
splitted_contents = filein.read().split()
return list(map(int, splitted_contents))
def output_array(array, filename='output.txt'):
with open(filename, 'w') as fileout:
for new in array:
fileout.write(str(new)+" ")
def output_int(int_, filename="output.txt"):
with open(filename, 'w') as fileout:
fileout.write(str(int_))
def add_always(i):
i=1
x=[]
while i<=9:
x.append(i)
i+=1
i=1
j=1
k=1
x.append(1)
x.append(0)
while j<=9:
while i<=9:
x.append(j)
x.append(i)
i+=1
j+=1
i=0
m=100
while m<200:
x.append(m)
m+=1
while k<=9:
while j<=9:
while i<=9:
x.append(k)
x.append(j)
x.append(i)
i+=1
j+=1
i=0
k+=1
j=0
x.append(1)
x.append(0)
x.append(0)
x.append(0)
return(x)
def main():
data=read_ints()
s=add_always(0)
data=data[1:]
for m in data:
if m==1:
print(1)
else:
print(s[m-1])
if __name__ == '__main__':
main()
Test details
Test 1
Group: 1
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 582 214 723 273 ... |
| correct output |
|---|
| 0 1 7 7 6 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 86, in <module>
main()...Test 2
Group: 2
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 615664 916441 627600 279508 ... |
| correct output |
|---|
| 1 2 3 2 2 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 86, in <module>
main()...Test 3
Group: 3
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 672274832941907421 260504693279721732 646999966092970935 100853063389774434 ... |
| correct output |
|---|
| 7 2 2 0 9 ... |
| user output |
|---|
| (empty) |
Error:
Traceback (most recent call last):
File "input/code.py", line 86, in <module>
main()...