CSES - Datatähti 2019 alku - Results
Submission details
Task:Taulukko
Sender:SeveriK
Submission time:2018-10-07 21:20:28 +0300
Language:Python3
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
#30
#40
Test results
testverdicttimegroup
#10.05 s1details
#20.05 s1details
#30.06 s1details
#40.04 s1details
#50.04 s1details
#60.05 s1details
#70.05 s1details
#80.04 s1details
#90.06 s1details
#100.05 s1details
#110.04 s1details
#120.04 s1details
#130.05 s1details
#140.04 s1details
#150.04 s2details
#160.05 s2details
#170.05 s2details
#180.05 s2details
#190.04 s2details
#200.05 s2details
#210.05 s2details
#220.05 s2details
#230.04 s2details
#240.05 s2details
#250.05 s2details
#260.05 s2details
#270.05 s2details
#280.05 s2details
#290.06 s3details
#300.09 s3details
#310.04 s3details
#320.05 s3details
#330.06 s3details
#340.06 s3details
#350.06 s3details
#360.05 s3details
#370.05 s4details
#380.08 s4details
#390.05 s4details
#400.06 s4details
#410.05 s4details
#420.08 s4details
#430.06 s4details
#440.05 s4details
#450.06 s4details
#460.05 s4details
#470.06 s4details
#480.08 s4details
#490.05 s4details
#500.07 s4details
#510.05 s4details
#520.08 s4details

Code

# Python3

n = int(input().split()[0])
k = int(input())

inputs = []
i = 0
while i < n:
    inputs.append(int(input()))
    i += 1

output = 0
o = 0
p = 0
difNums = []

while o < n:
    while p < n:
        if difNums.count(inputs[p]) == 0:
            difNums.append(inputs[p])
        output += 1
        p += 1
        if len(difNums) > k:
            output -= 1
            difNums.clear()
            p = n
    o += 1
    p = o

print(output)

Test details

Test 1

Group: 1

Verdict:

input
100 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 2

Group: 1

Verdict:

input
100 1
1 1 1 1 2 2 1 1 2 2 2 2 2 1 1 ...

correct output
190

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 2 2 1 1 2 2 2 2 2 1 1 2 2 2 2 1 2 1 2 2 1 2 1 2 1 1 1 1 1 1 2 2 2 2 1 2 1 2 1 1 2 1 2 2 2 1 1 1 1 2 1 1 2 2 1 2 1 2 1 2 1 2 1 2 2 1 1 1 2 1 2 2 2 2 2 1 1 1 2 1 1 2 2 1 2 1 2 2 2 2 1 2 1 1 1 1

Test 3

Group: 1

Verdict:

input
100 1
5 9 9 6 9 8 1 4 7 7 8 9 5 5 6 ...

correct output
110

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '5 9 9 6 9 8 1 4 7 7 8 9 5 5 6 1 9 3 6 2 7 6 7 5 9 8 4 1 10 4 4 3 3 7 6 8 10 2 8 3 7 5 1 7 5 5 2 9 1 8 1 6 6 5 2 2 2 6 4 8 9 8 4 6 3 8 10 5 3 1 6 1 7 2 3 1 6 4 8 4 6 8 2 5 7 8 1 3 4 5 6 7 4 7 4 7 10 4

Test 4

Group: 1

Verdict:

input
100 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 5

Group: 1

Verdict:

input
100 2
2 1 2 1 2 2 1 1 2 1 1 2 1 2 1 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '2 1 2 1 2 2 1 1 2 1 1 2 1 2 1 1 2 2 1 2 1 1 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 2 1 1 1 1 1 2 2 1 1 1 2 1 1 1 2 2 1 2 1 1 1 2 2 1 2 2 1 2 2 2 1 1 2 1 1 2 1 2 1 1 1 2 1 2 1 1 1 2 2 1 2 2 2 2 1 1 2 2 1 2 1 1

Test 6

Group: 1

Verdict:

input
100 2
2 3 1 1 2 2 3 1 2 1 1 1 3 3 1 ...

correct output
379

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '2 3 1 1 2 2 3 1 2 1 1 1 3 3 1 2 1 1 2 1 2 3 3 1 1 1 1 2 2 2 3 1 3 2 2 3 3 2 3 1 3 3 1 3 2 2 3 1 1 3 1 2 2 3 1 1 1 2 3 3 3 2 1 2 1 3 1 3 2 2 3 2 2 3 3 1 3 1 1 1 1 3 2 2 3 2 3 1 2 3 1 1 2 1 3 2 3 2 1 3

Test 7

Group: 1

Verdict:

input
100 2
4 6 10 8 6 8 10 8 4 7 8 9 6 2 ...

correct output
245

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '4 6 10 8 6 8 10 8 4 7 8 9 6 2 6 6 8 8 6 4 9 10 1 4 10 1 5 7 6 6 1 6 1 6 10 1 2 10 5 1 1 8 8 1 2 8 3 1 6 10 8 7 3 4 1 9 9 6 5 7 3 7 3 3 1 4 10 7 3 3 4 9 7 3 10 10 7 5 2 4 3 5 5 8 2 9 10 2 9 10 6 10 3

Test 8

Group: 1

Verdict:

input
100 5
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 9

Group: 1

Verdict:

input
100 5
4 4 2 2 4 3 3 2 3 4 3 5 3 1 5 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '4 4 2 2 4 3 3 2 3 4 3 5 3 1 5 4 3 4 2 5 4 2 4 5 3 1 4 3 4 3 5 1 5 3 5 5 2 2 3 5 5 3 3 2 4 3 5 3 5 1 4 1 4 1 4 5 4 5 4 4 4 2 3 5 5 4 4 1 4 3 2 3 5 3 4 1 2 3 1 5 2 4 4 1 1 3 5 2 4 3 2 3 4 4 4 3 1 5 5 1

Test 10

Group: 1

Verdict:

input
100 5
5 3 4 1 1 1 1 4 5 5 4 6 6 3 3 ...

correct output
1488

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '5 3 4 1 1 1 1 4 5 5 4 6 6 3 3 2 4 2 3 1 4 2 4 1 1 3 5 3 2 6 3 5 6 1 5 3 5 5 4 5 4 1 5 3 2 6 4 3 5 4 3 2 4 2 3 1 1 2 2 4 1 2 2 5 5 5 1 1 4 5 4 5 2 5 6 1 6 1 4 6 6 1 5 6 6 6 2 5 3 3 5 2 5 2 2 5 3 1 2 5

Test 11

Group: 1

Verdict:

input
100 5
10 1 1 9 1 6 9 4 3 10 9 2 4 2 ...

correct output
743

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '10 1 1 9 1 6 9 4 3 10 9 2 4 2 10 7 1 4 4 7 3 3 3 3 8 3 8 9 3 9 10 9 2 4 1 7 10 1 5 9 9 10 4 2 9 5 8 9 1 5 2 5 8 4 2 5 9 5 10 1 2 9 2 5 1 4 8 6 8 2 7 9 5 4 5 10 2 5 8 1 9 5 7 7 5 7 5 5 4 8 4 9 2 4 9 1

Test 12

Group: 1

Verdict:

input
100 10
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 13

Group: 1

Verdict:

input
100 10
9 4 9 1 9 1 5 2 10 10 9 3 9 6 ...

correct output
5050

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '9 4 9 1 9 1 5 2 10 10 9 3 9 6 9 9 8 7 2 7 4 8 6 3 4 4 4 3 1 5 1 3 4 10 8 6 6 9 9 8 6 3 9 5 3 9 9 1 9 3 6 10 2 5 10 7 3 2 5 4 6 2 4 9 2 9 10 10 5 8 8 6 2 2 7 4 3 4 4 5 3 6 5 5 4 10 6 3 8 9 1 4 8 5 5 5

Test 14

Group: 1

Verdict:

input
100 10
80 59 58 87 28 83 83 93 96 24 ...

correct output
994

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '80 59 58 87 28 83 83 93 96 24 54 2 49 69 70 53 30 56 8 21 94 9 15 59 39 1 11 84 93 71 84 76 68 70 51 97 32 79 56 100 10 70 52 25 56 35 48 45 51 40 82 41 69 3 1 46 30 95 61 66 44 83 44 73 8 58 25 80 6

Test 15

Group: 2

Verdict:

input
5000 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 16

Group: 2

Verdict:

input
5000 1
2 2 2 1 2 1 1 1 2 2 1 2 1 1 1 ...

correct output
10148

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '2 2 2 1 2 1 1 1 2 2 1 2 1 1 1 1 1 1 2 1 1 2 2 2 1 1 2 2 1 1 2 1 1 1 2 1 2 2 2 1 1 2 2 2 2 1 2 2 2 1 2 1 1 1 1 1 1 1 1 2 1 1 1 1 1 2 1 1 1 1 2 1 2 1 1 2 1 2 1 1 2 1 2 2 2 2 1 1 1 1 2 1 2 1 2 2 1 2 2 2

Test 17

Group: 2

Verdict:

input
5000 1
434568 634119 102509 107238 72...

correct output
5000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '434568 634119 102509 107238 722277 348483 479694 781663 291149 426246 852544 646031 850078 968388 895010 828138 657940 417475 510979 994257 524851 934385 643299 259314 325080 650235 192611 83834 6690

Test 18

Group: 2

Verdict:

input
5000 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 19

Group: 2

Verdict:

input
5000 2
2 1 1 1 2 2 2 2 1 1 1 1 2 1 2 ...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '2 1 1 1 2 2 2 2 1 1 1 1 2 1 2 2 2 2 1 2 2 1 1 1 1 1 2 2 2 1 2 1 1 2 1 1 1 1 2 2 2 2 2 2 2 1 2 1 2 1 2 1 1 1 1 1 1 1 2 2 1 2 1 2 1 2 1 1 2 2 2 1 2 1 2 1 1 1 2 1 1 2 1 2 2 2 1 1 1 1 2 2 1 2 1 2 2 1 1 1

Test 20

Group: 2

Verdict:

input
5000 2
1 3 2 2 3 3 1 2 1 2 1 2 3 1 2 ...

correct output
22451

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 3 2 2 3 3 1 2 1 2 1 2 3 1 2 2 1 3 3 1 1 3 1 3 2 2 2 1 2 1 1 2 1 1 2 2 3 1 1 3 1 2 2 2 1 1 3 2 1 3 3 3 3 3 2 2 3 2 3 2 1 2 3 1 3 2 3 1 3 2 3 3 1 1 1 2 2 3 2 3 2 2 1 2 3 2 3 1 3 1 3 3 2 2 1 3 2 3 3 2

Test 21

Group: 2

Verdict:

input
5000 2
132968 414421 468358 432744 43...

correct output
9999

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '132968 414421 468358 432744 437789 860091 30472 300325 838387 594550 983286 7238 424747 246862 461151 112114 674519 782970 412238 456617 283358 6033 972404 48808 727246 511338 622925 825425 693410 94

Test 22

Group: 2

Verdict:

input
5000 100
93 76 87 71 93 74 69 35 92 96 ...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '93 76 87 71 93 74 69 35 92 96 46 2 32 67 23 16 29 37 65 32 95 5 31 79 55 16 78 7 69 13 59 13 57 61 69 22 100 17 81 42 66 6 14 75 32 100 11 72 12 89 53 54 59 12 29 7 56 97 77 97 6 65 91 14 97 14 76 75

Test 23

Group: 2

Verdict:

input
5000 100
2 57 51 4 35 76 5 40 51 55 20 ...

correct output
2669737

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '2 57 51 4 35 76 5 40 51 55 20 89 100 77 71 73 61 39 59 71 8 20 43 49 95 8 8 48 15 41 77 65 58 5 83 75 70 35 82 74 4 82 10 79 76 47 66 54 34 76 97 37 98 40 93 21 4 42 84 67 67 10 17 5 83 3 8 25 31 79

Test 24

Group: 2

Verdict:

input
5000 100
657 823 1773 1801 2785 4107 25...

correct output
498978

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '657 823 1773 1801 2785 4107 2589 3779 3799 139 3056 2076 46 4835 2609 76 160 4011 2932 3481 2522 998 3531 3869 976 2845 3421 2130 1098 3297 3566 1788 2336 3942 62 236 1450 1707 4498 338 2571 2890 423

Test 25

Group: 2

Verdict:

input
5000 4999
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 26

Group: 2

Verdict:

input
5000 4999
865706 910619 695192 183574 92...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '865706 910619 695192 183574 921157 647791 996135 323089 195362 660143 772009 356838 172284 643894 108753 566153 242494 283015 596488 258505 376084 661514 182038 56425 239946 426435 151117 918734 8423

Test 27

Group: 2

Verdict:

input
5000 5000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 28

Group: 2

Verdict:

input
5000 5000
774752 159472 183796 654476 69...

correct output
12502500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '774752 159472 183796 654476 69428 399043 675039 361341 490614 94058 407271 32491 781601 713557 943839 43180 410445 766484 498094 412373 202292 88561 224154 319351 655004 621398 617541 167508 777251 5

Test 29

Group: 3

Verdict:

input
500000 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 30

Group: 3

Verdict:

input
500000 1
28107328 613212742 298033960 7...

correct output
500000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '28107328 613212742 298033960 717578055 811519556 381018673 877601515 59549871 251106448 140059637 9338094 263673920 974465790 222222755 311887446 587988629 737926605 342477735 601145596 357286479 613

Test 31

Group: 3

Verdict:

input
500000 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 32

Group: 3

Verdict:

input
500000 2
1 1 2 1 1 2 2 1 2 1 2 1 1 2 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 2 1 1 2 2 1 2 1 2 1 1 2 1 1 2 1 2 2 2 2 2 1 1 1 1 2 2 2 2 2 1 2 1 1 2 2 2 2 1 1 1 1 1 1 2 2 2 1 2 1 1 2 1 2 2 1 1 2 2 1 1 1 2 1 2 2 2 1 1 1 2 2 2 2 2 1 1 1 1 2 2 1 1 1 2 1 1 2 2 1 2 1 2 1 1 1 1 1

Test 33

Group: 3

Verdict:

input
500000 2
3 2 2 3 2 2 2 1 1 2 2 3 2 3 2 ...

correct output
2245355

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '3 2 2 3 2 2 2 1 1 2 2 3 2 3 2 3 1 1 3 3 2 1 1 1 2 3 1 2 3 2 1 3 2 3 3 2 3 1 1 3 3 3 3 3 1 1 1 2 1 3 2 3 2 3 2 3 1 1 3 3 2 1 3 3 1 3 3 3 3 2 2 1 2 1 2 2 1 3 1 3 2 2 2 3 2 1 2 3 3 1 2 1 2 1 3 1 2 1 1 2

Test 34

Group: 3

Verdict:

input
500000 2
1 1 1 2 2 2 1 1 2 1 1 2 1 2 1 ...

correct output
1570486882

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 2 2 2 1 1 2 1 1 2 1 2 1 2 2 1 1 1 1 2 1 1 1 1 1 2 1 1 2 2 2 1 1 1 1 1 2 2 2 2 2 2 1 2 2 2 2 2 2 1 2 2 2 2 1 2 2 2 1 1 1 2 2 2 2 2 2 1 1 2 1 2 1 1 2 1 2 2 2 1 1 1 1 2 2 2 2 1 2 2 1 2 2 2 1 1 1 2

Test 35

Group: 3

Verdict:

input
500000 2
318961563 84011941 882177798 1...

correct output
999999

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '318961563 84011941 882177798 181616555 219967374 299859685 800419391 142070420 439992505 386822250 395061994 912780354 661309265 986195883 124670034 769007754 875378706 813713957 93516518 134288593 1

Test 36

Group: 3

Verdict:

input
500000 2
1 1 2 1 2 1 2 1 2 2 2 2 1 2 1 ...

correct output
483793169

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 2 1 2 1 2 1 2 2 2 2 1 2 1 2 2 2 1 1 1 1 1 1 1 1 1 2 2 2 1 2 1 2 2 1 1 2 1 2 2 1 2 1 1 1 1 1 1 2 1 1 1 1 1 1 1 1 2 1 2 2 1 1 1 2 1 1 1 2 1 1 2 1 2 2 2 1 1 1 2 1 1 2 2 2 1 1 2 1 1 1 1 1 2 2 1 2 2 2

Test 37

Group: 4

Verdict:

input
500000 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 38

Group: 4

Verdict:

input
500000 1
709486749 350496125 796065873 ...

correct output
500000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '709486749 350496125 796065873 825702985 757377707 465986623 53387219 851098474 206876937 188323042 455289369 57410971 914549914 889735941 499466545 897083534 724679258 754046292 380386119 449559771 5

Test 39

Group: 4

Verdict:

input
500000 2
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 40

Group: 4

Verdict:

input
500000 2
1 2 2 2 2 2 1 1 2 2 2 2 2 2 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 2 2 2 2 2 1 1 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 2 1 2 1 1 1 2 2 1 2 2 1 1 2 2 1 1 1 2 1 2 1 1 1 2 2 1 1 1 2 2 2 1 1 2 2 2 1 2 2 2 1 2 1 1 1 1 2 1 2 2 1 2 2 2 1 2 1 2 1 2 2 2 2 2 1 2 2 2 2 1 2 1 1 1

Test 41

Group: 4

Verdict:

input
500000 2
3 3 3 3 2 1 3 2 1 3 1 2 1 1 1 ...

correct output
2255047

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '3 3 3 3 2 1 3 2 1 3 1 2 1 1 1 3 2 3 2 2 2 1 2 2 1 3 2 1 3 1 3 1 1 3 3 2 2 2 3 2 1 3 3 3 2 2 2 2 2 1 1 3 2 2 1 2 3 3 3 3 1 1 1 2 3 3 2 3 1 3 2 2 2 2 1 1 1 2 2 1 2 2 1 2 1 1 3 1 2 1 2 3 1 2 1 1 1 3 2 2

Test 42

Group: 4

Verdict:

input
500000 2
414942284 362802746 108881396 ...

correct output
999999

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '414942284 362802746 108881396 156269160 584804303 372448171 194235507 170131619 864020567 429202373 592851510 285026555 325167695 573073544 370732827 577063419 87633143 733943111 449516637 791697472

Test 43

Group: 4

Verdict:

input
500000 100
59 14 100 74 49 43 91 84 31 16...

correct output
260458849

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '59 14 100 74 49 43 91 84 31 16 19 91 48 5 14 13 38 25 46 66 37 76 91 79 49 12 11 85 52 40 17 74 28 47 10 80 28 31 73 96 6 65 93 75 96 14 22 38 7 76 53 1 29 35 91 82 36 60 58 73 95 30 33 23 14 92 84 3

Test 44

Group: 4

Verdict:

input
500000 1000
505 511 86 321 780 495 106 330...

correct output
3694803834

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '505 511 86 321 780 495 106 330 208 216 589 85 409 80 288 658 724 399 411 991 44 876 771 378 958 998 417 705 756 213 25 642 475 427 516 529 528 195 67 489 653 117 75 364 900 904 865 52 628 272 683 646

Test 45

Group: 4

Verdict:

input
500000 10000
4956 8463 8582 980 9278 1747 2...

correct output
41655235436

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '4956 8463 8582 980 9278 1747 2376 3640 4567 3077 9315 6157 3674 1012 7773 275 9583 4880 225 2259 2671 4030 4850 6850 2450 6391 8616 848 7585 2747 3721 8 5237 1785 941 4437 2726 5076 4288 3823 6845 99

Test 46

Group: 4

Verdict:

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

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 47

Group: 4

Verdict:

input
500000 100000
40198 78364 3724 51802 378 130...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '40198 78364 3724 51802 378 13001 13875 67445 73510 73796 16267 19766 30448 99061 73976 16416 49504 28617 45752 68760 78694 62350 22193 81723 77137 73957 2153 46092 2150 87471 67869 41812 37800 45132

Test 48

Group: 4

Verdict:

input
500000 100000
320513086 811766509 339605137 ...

correct output
45001856854

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '320513086 811766509 339605137 542466708 376731251 878034973 634642660 155058670 933139627 125870276 22184604 752954181 542056208 701624645 90663227 87121331 442193101 947939293 668093421 617537460 82

Test 49

Group: 4

Verdict:

input
500000 499999
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 50

Group: 4

Verdict:

input
500000 499999
995132060 587162982 59723733 8...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '995132060 587162982 59723733 871894056 518977007 894882627 276224485 217553786 893180628 897824305 94257607 454115743 787767700 446634226 868367835 684634896 140309205 240055642 30881734 566834479 86

Test 51

Group: 4

Verdict:

input
500000 500000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Test 52

Group: 4

Verdict:

input
500000 500000
72083718 753463162 730560260 6...

correct output
125000250000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 4, in <module>
    k = int(input())
ValueError: invalid literal for int() with base 10: '72083718 753463162 730560260 690161262 51861881 321135431 314129368 172425560 563280278 192166233 314085686 888898223 541351011 67430185 801238912 828761444 80657421 941646520 458703023 651978000 395