CSES - Datatähti 2018 loppu - Results
Submission details
Task:Tietoverkko
Sender:Kameli
Submission time:2018-01-18 15:27:16 +0200
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
Test results
testverdicttimegroup
#10.07 s1details
#20.08 s1details
#30.07 s1details
#40.07 s1details
#50.07 s1details
#60.60 s2details
#70.53 s2details
#80.53 s2details
#90.57 s2details
#100.55 s2details

Code

n=int(input())
verkko=[]
verkko.append(None)
for i in range(n):
    verkko.append([])
for i in range(n):
    t1,t2=list(map(int,input().split()))
    verkko[t1].append(t2)
    verkko[t2].append(t1)
print(verkko)
c=0
for i in verkko:
    if len(i)==1:
        c+=1
print(c)

Test details

Test 1

Group: 1

Verdict:

input
100
16 88
6 77
60 92
98 64
...

correct output
97

user output
[None, [72], [63], [84], [68],...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 2

Group: 1

Verdict:

input
100
97 41
95 93
79 60
5 4
...

correct output
95

user output
[None, [25, 95], [3], [93, 2, ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 3

Group: 1

Verdict:

input
100
87 24
21 49
86 85
42 32
...

correct output
90

user output
[None, [20], [91], [17], [70],...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 4

Group: 1

Verdict:

input
100
30 24
54 79
51 6
80 29
...

correct output
50

user output
[None, [24], [81, 40], [56], [...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 5

Group: 1

Verdict:

input
100
11 27
54 59
100 90
2 95
...

correct output
0

user output
[None, [90, 47], [95, 16], [19...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 6

Group: 2

Verdict:

input
100000
98276 76171
70684 49183
48756 661
17166 16972
...

correct output
99997

user output
[None, [33798, 53861, 68116, 9...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 7

Group: 2

Verdict:

input
100000
35903 47275
13566 84
58018 42495
57071 4451
...

correct output
99995

user output
[None, [22878], [89887], [5000...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 8

Group: 2

Verdict:

input
100000
79209 94485
60266 86793
27501 19927
13544 59730
...

correct output
99000

user output
[None, [84274], [19722], [3964...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 9

Group: 2

Verdict:

input
100000
68402 82703
12892 46068
60013 40753
26168 34434
...

correct output
90000

user output
[None, [6553], [54443, 33515, ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()

Test 10

Group: 2

Verdict:

input
100000
37330 74855
54324 45726
61652 15611
79081 47339
...

correct output
0

user output
[None, [51362, 26686], [7390, ...

Error:
Traceback (most recent call last):
  File "input/code.py", line 13, in <module>
    if len(i)==1:
TypeError: object of type 'NoneType' has no len()