CSES - E4590 2020 2 - Results
Submission details
Task:Congested uploads
Sender:toothfairy
Submission time:2020-09-19 13:45:47 +0300
Language:CPython3
Status:READY
Result:
Test results
testverdicttime
#10.02 sdetails
#20.02 sdetails
#30.02 sdetails
#40.03 sdetails
#50.02 sdetails
#60.02 sdetails
#70.02 sdetails
#80.02 sdetails
#90.02 sdetails
#100.02 sdetails
#110.02 sdetails
#120.02 sdetails
#130.02 sdetails
#140.02 sdetails
#150.02 sdetails
#160.02 sdetails
#170.02 sdetails
#180.03 sdetails
#190.02 sdetails
#200.02 sdetails
#210.02 sdetails
#220.03 sdetails
#230.02 sdetails
#240.02 sdetails
#250.02 sdetails
#260.02 sdetails
#270.02 sdetails

Code

# Python3 program to implement division  
# with large number  
import math 
  
# A function to perform division of  
# large numbers  
def longDivision(number, divisor):  
  
    # As result can be very large  
    # store it in string  
    ans = "";  
      
    # Find prefix of number that  
    # is larger than divisor.  
    idx = 0;  
    temp = ord(number[idx]) - ord('0'); 
    while (temp < divisor): 
        temp = (temp * 10 + ord(number[idx + 1]) -
                            ord('0')); 
        idx += 1; 
      
    idx += 1; 
  
    # Repeatedly divide divisor with temp.  
    # After every division, update temp to  
    # include one more digit.  
    while ((len(number)) > idx):  
          
        # Store result in answer i.e. temp / divisor  
        ans += chr(math.floor(temp // divisor) + ord('0'));  
          
        # Take next digit of number 
        temp = ((temp % divisor) * 10 + ord(number[idx]) -
                                        ord('0')); 
        idx += 1; 
  
    ans += chr(math.floor(temp // divisor) + ord('0')); 
      
    # If divisor is greater than number  
    if (len(ans) == 0):  
        return "0";  
      
    # else return ans  
    return ans;  
  




value = input()
arr = value.split("\t")
sum = 0;
for va in arr:
  sum+= int(va)

remainder = sum%3
value = str(3-remainder)+value
fac = longDivision(value, 3) 
print(value)
print(str(3)+" "+fac)
# print(str(int(fac*3)))

Test details

Test 1

Verdict:

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

correct output
2

user output
(empty)

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

Test 2

Verdict:

input
2 1 1
2
1 2

correct output
1

user output
(empty)

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

Test 3

Verdict:

input
2 1 2
2 2
1 2

correct output
2

user output
(empty)

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

Test 4

Verdict:

input
3 2 2
2 3
1 2
1 3

correct output
1

user output
(empty)

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

Test 5

Verdict:

input
3 2 2
2 3
1 2
2 3

correct output
2

user output
(empty)

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

Test 6

Verdict:

input
3 2 1
3
1 2
2 3

correct output
1

user output
(empty)

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

Test 7

Verdict:

input
3 2 1
2
1 2
2 3

correct output
1

user output
(empty)

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

Test 8

Verdict:

input
20 19 20
18 5 2 6 2 10 19 4 9 6 12 16 1...

correct output
13

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '20 19 20'

Test 9

Verdict:

input
20 19 20
7 11 19 12 13 17 4 18 6 17 8 1...

correct output
8

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '20 19 20'

Test 10

Verdict:

input
20 40 20
6 17 11 14 20 5 5 5 7 16 14 16...

correct output
4

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '20 40 20'

Test 11

Verdict:

input
20 25 100000
4 2 17 10 17 2 19 18 16 9 11 1...

correct output
33334

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '20 25 100000'

Test 12

Verdict:

input
100 99 100000
3 27 59 39 66 31 95 92 47 47 1...

correct output
99035

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 99 100000'

Test 13

Verdict:

input
100 99 100000
63 84 29 72 47 74 86 94 39 17 ...

correct output
70942

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 99 100000'

Test 14

Verdict:

input
100 1000 100000
28 99 82 45 97 64 17 90 14 100...

correct output
3572

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 1000 100000'

Test 15

Verdict:

input
100 1000 100000
85 94 68 6 60 68 48 43 65 56 5...

correct output
5264

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 1000 100000'

Test 16

Verdict:

input
100 110 100000
90 82 10 41 18 47 4 69 10 15 7...

correct output
27602

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 110 100000'

Test 17

Verdict:

input
100 750 100000
97 42 4 95 51 35 8 23 18 95 3 ...

correct output
5883

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 750 100000'

Test 18

Verdict:

input
100 1000 1
28
1 2
1 3
1 11
...

correct output
1

user output
(empty)

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

Test 19

Verdict:

input
100 99 100000
34 86 79 60 58 77 44 61 64 13 ...

correct output
100000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 99 100000'

Test 20

Verdict:

input
100 99 100000
74 19 28 27 87 48 3 56 25 9 60...

correct output
1099

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 99 100000'

Test 21

Verdict:

input
45 990 100000
45 36 25 26 32 4 2 8 38 43 17 ...

correct output
2273

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '45 990 100000'

Test 22

Verdict:

input
100 1000 100000
95 95 42 81 25 56 96 22 78 27 ...

correct output
4762

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 1000 100000'

Test 23

Verdict:

input
100 1000 100000
56 74 9 78 40 41 28 21 43 24 6...

correct output
5000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 1000 100000'

Test 24

Verdict:

input
100 1000 100000
38 82 30 31 30 56 33 21 41 96 ...

correct output
3847

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 1000 100000'

Test 25

Verdict:

input
100 100 100000
59 78 66 43 7 7 51 3 99 53 70 ...

correct output
100000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 100 100000'

Test 26

Verdict:

input
100 100 100000
96 98 3 83 15 39 27 40 94 7 89...

correct output
50000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 100 100000'

Test 27

Verdict:

input
100 99 100000
100 100 100 100 100 100 100 10...

correct output
100000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 54, in <module>
    sum+= int(va)
ValueError: invalid literal for int() with base 10: '100 99 100000'