Task: | Gas tank |
Sender: | aalto2024k_002 |
Submission time: | 2024-11-13 17:11:52 +0200 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | WRONG ANSWER |
test | verdict | time | |
---|---|---|---|
#1 | WRONG ANSWER | 0.27 s | details |
#2 | WRONG ANSWER | 0.27 s | details |
#3 | WRONG ANSWER | 0.27 s | details |
#4 | WRONG ANSWER | 0.27 s | details |
#5 | WRONG ANSWER | 0.27 s | details |
#6 | WRONG ANSWER | 0.27 s | details |
#7 | WRONG ANSWER | 0.27 s | details |
#8 | WRONG ANSWER | 0.27 s | details |
#9 | WRONG ANSWER | 0.28 s | details |
#10 | WRONG ANSWER | 0.27 s | details |
#11 | WRONG ANSWER | 0.27 s | details |
#12 | WRONG ANSWER | 0.27 s | details |
#13 | WRONG ANSWER | 0.27 s | details |
#14 | WRONG ANSWER | 0.27 s | details |
#15 | WRONG ANSWER | 0.27 s | details |
#16 | WRONG ANSWER | 0.27 s | details |
#17 | WRONG ANSWER | 0.27 s | details |
#18 | WRONG ANSWER | 0.28 s | details |
#19 | WRONG ANSWER | 0.28 s | details |
#20 | WRONG ANSWER | 0.27 s | details |
#21 | WRONG ANSWER | 0.27 s | details |
#22 | WRONG ANSWER | 0.28 s | details |
#23 | WRONG ANSWER | 0.27 s | details |
#24 | WRONG ANSWER | 0.28 s | details |
#25 | WRONG ANSWER | 0.28 s | details |
#26 | WRONG ANSWER | 0.28 s | details |
#27 | WRONG ANSWER | 0.28 s | details |
#28 | WRONG ANSWER | 0.27 s | details |
#29 | WRONG ANSWER | 0.27 s | details |
#30 | WRONG ANSWER | 0.27 s | details |
#31 | WRONG ANSWER | 0.28 s | details |
#32 | WRONG ANSWER | 0.27 s | details |
#33 | WRONG ANSWER | 0.27 s | details |
#34 | WRONG ANSWER | 0.27 s | details |
#35 | WRONG ANSWER | 0.28 s | details |
#36 | WRONG ANSWER | 0.27 s | details |
#37 | WRONG ANSWER | 0.27 s | details |
#38 | WRONG ANSWER | 0.28 s | details |
#39 | WRONG ANSWER | 0.27 s | details |
#40 | WRONG ANSWER | 0.28 s | details |
#41 | WRONG ANSWER | 0.27 s | details |
#42 | WRONG ANSWER | 0.28 s | details |
#43 | WRONG ANSWER | 0.28 s | details |
#44 | WRONG ANSWER | 0.27 s | details |
#45 | WRONG ANSWER | 0.28 s | details |
#46 | WRONG ANSWER | 0.27 s | details |
#47 | WRONG ANSWER | 0.28 s | details |
#48 | WRONG ANSWER | 0.27 s | details |
#49 | WRONG ANSWER | 0.27 s | details |
#50 | WRONG ANSWER | 0.28 s | details |
#51 | WRONG ANSWER | 0.28 s | details |
#52 | WRONG ANSWER | 0.27 s | details |
#53 | WRONG ANSWER | 0.28 s | details |
#54 | WRONG ANSWER | 0.28 s | details |
#55 | WRONG ANSWER | 0.27 s | details |
#56 | WRONG ANSWER | 0.28 s | details |
#57 | WRONG ANSWER | 0.28 s | details |
#58 | WRONG ANSWER | 0.28 s | details |
#59 | WRONG ANSWER | 0.28 s | details |
#60 | WRONG ANSWER | 0.28 s | details |
#61 | WRONG ANSWER | 0.35 s | details |
#62 | WRONG ANSWER | 0.38 s | details |
#63 | WRONG ANSWER | 0.32 s | details |
#64 | WRONG ANSWER | 0.30 s | details |
#65 | WRONG ANSWER | 0.32 s | details |
#66 | WRONG ANSWER | 0.36 s | details |
#67 | WRONG ANSWER | 0.30 s | details |
#68 | WRONG ANSWER | 0.36 s | details |
#69 | WRONG ANSWER | 0.30 s | details |
#70 | WRONG ANSWER | 0.39 s | details |
#71 | WRONG ANSWER | 0.35 s | details |
#72 | WRONG ANSWER | 0.34 s | details |
#73 | WRONG ANSWER | 0.38 s | details |
#74 | WRONG ANSWER | 0.33 s | details |
#75 | WRONG ANSWER | 0.30 s | details |
#76 | WRONG ANSWER | 0.34 s | details |
#77 | WRONG ANSWER | 0.38 s | details |
#78 | WRONG ANSWER | 0.29 s | details |
#79 | WRONG ANSWER | 0.34 s | details |
#80 | WRONG ANSWER | 0.36 s | details |
Code
import math i = int(input()) tmp = math.floor(math.sqrt(i) / 2.0) def get_b(a, c): A = a B = a*a C = -c subsum = B*B - (4*A*C) if subsum < 0: return 0, 0 f = -(B - math.sqrt(subsum)) / (2 * A) s = -(B + math.sqrt(subsum)) / (2 * A) if f > s: return math.floor(f), math.ceil(f) return math.floor(s), math.ceil(s) best_a, best_b = 0, 0 best_vol = 0 for os in range(-1000000, 1000000): a = tmp+os if a <= 0: continue for b in get_b(a, i): vol = a*a*b + a*b*b if vol <= i and vol > best_vol: best_vol = vol best_a = a best_b = b print(vol) print(int(best_b), int(best_a))
Test details
Test 1
Verdict: WRONG ANSWER
input |
---|
8 |
correct output |
---|
2 1 |
user output |
---|
6 2 1 |
Test 2
Verdict: WRONG ANSWER
input |
---|
7 |
correct output |
---|
2 1 |
user output |
---|
6 2 1 |
Test 3
Verdict: WRONG ANSWER
input |
---|
46 |
correct output |
---|
6 1 |
user output |
---|
42 6 1 |
Test 4
Verdict: WRONG ANSWER
input |
---|
28 |
correct output |
---|
4 1 |
user output |
---|
20 4 1 |
Test 5
Verdict: WRONG ANSWER
input |
---|
40 |
correct output |
---|
5 1 |
user output |
---|
30 5 1 |
Test 6
Verdict: WRONG ANSWER
input |
---|
34 |
correct output |
---|
5 1 |
user output |
---|
30 5 1 |
Test 7
Verdict: WRONG ANSWER
input |
---|
39 |
correct output |
---|
5 1 |
user output |
---|
30 5 1 |
Test 8
Verdict: WRONG ANSWER
input |
---|
38 |
correct output |
---|
5 1 |
user output |
---|
30 5 1 |
Test 9
Verdict: WRONG ANSWER
input |
---|
25 |
correct output |
---|
4 1 |
user output |
---|
20 4 1 |
Test 10
Verdict: WRONG ANSWER
input |
---|
26 |
correct output |
---|
4 1 |
user output |
---|
20 4 1 |
Test 11
Verdict: WRONG ANSWER
input |
---|
549 |
correct output |
---|
7 6 |
user output |
---|
506 510 540 546 7 6 |
Test 12
Verdict: WRONG ANSWER
input |
---|
418 |
correct output |
---|
13 2 |
user output |
---|
380 390 13 2 |
Test 13
Verdict: WRONG ANSWER
input |
---|
436 |
correct output |
---|
6 6 |
user output |
---|
420 432 6 6 |
Test 14
Verdict: WRONG ANSWER
input |
---|
551 |
correct output |
---|
7 6 |
user output |
---|
506 510 540 546 7 6 |
Test 15
Verdict: WRONG ANSWER
input |
---|
968 |
correct output |
---|
21 2 |
user output |
---|
930 966 21 2 |
Test 16
Verdict: WRONG ANSWER
input |
---|
222 |
correct output |
---|
14 1 |
user output |
---|
210 14 1 |
Test 17
Verdict: WRONG ANSWER
input |
---|
893 |
correct output |
---|
13 4 |
user output |
---|
870 880 884 13 4 |
Test 18
Verdict: WRONG ANSWER
input |
---|
77 |
correct output |
---|
8 1 |
user output |
---|
72 8 1 |
Test 19
Verdict: WRONG ANSWER
input |
---|
874 |
correct output |
---|
29 1 |
user output |
---|
870 29 1 |
Test 20
Verdict: WRONG ANSWER
input |
---|
11 |
correct output |
---|
2 1 |
user output |
---|
6 2 1 |
Test 21
Verdict: WRONG ANSWER
input |
---|
772 |
correct output |
---|
12 4 |
user output |
---|
756 768 12 4 |
Test 22
Verdict: WRONG ANSWER
input |
---|
181 |
correct output |
---|
5 4 |
user output |
---|
156 160 162 180 5 4 |
Test 23
Verdict: WRONG ANSWER
input |
---|
155 |
correct output |
---|
11 1 |
user output |
---|
132 11 1 |
Test 24
Verdict: WRONG ANSWER
input |
---|
778 |
correct output |
---|
12 4 |
user output |
---|
756 768 12 4 |
Test 25
Verdict: WRONG ANSWER
input |
---|
514 |
correct output |
---|
15 2 |
user output |
---|
506 510 15 2 |
Test 26
Verdict: WRONG ANSWER
input |
---|
849 |
correct output |
---|
8 7 |
user output |
---|
812 840 8 7 |
Test 27
Verdict: WRONG ANSWER
input |
---|
224 |
correct output |
---|
14 1 |
user output |
---|
210 14 1 |
Test 28
Verdict: WRONG ANSWER
input |
---|
295 |
correct output |
---|
11 2 |
user output |
---|
272 286 11 2 |
Test 29
Verdict: WRONG ANSWER
input |
---|
651 |
correct output |
---|
25 1 |
user output |
---|
650 25 1 |
Test 30
Verdict: WRONG ANSWER
input |
---|
98 |
correct output |
---|
6 2 |
user output |
---|
90 96 6 2 |
Test 31
Verdict: WRONG ANSWER
input |
---|
588264 |
correct output |
---|
172 18 |
user output |
---|
587522 587526 587760 588240 172 18 |
Test 32
Verdict: WRONG ANSWER
input |
---|
48736 |
correct output |
---|
80 7 |
user output |
---|
48620 48670 48720 80 7 |
Test 33
Verdict: WRONG ANSWER
input |
---|
208508 |
correct output |
---|
99 18 |
user output |
---|
208392 208494 99 18 |
Test 34
Verdict: WRONG ANSWER
input |
---|
517415 |
correct output |
---|
172 16 |
user output |
---|
516242 516780 516854 517376 172 16 |
Test 35
Verdict: WRONG ANSWER
input |
---|
960234 |
correct output |
---|
290 11 |
user output |
---|
959420 959946 960190 290 11 |
Test 36
Verdict: WRONG ANSWER
input |
---|
870321 |
correct output |
---|
111 49 |
user output |
---|
869556 869940 870000 870240 111 49 |
Test 37
Verdict: WRONG ANSWER
input |
---|
308005 |
correct output |
---|
70 40 |
user output |
---|
307470 307692 307914 308000 70 40 |
Test 38
Verdict: WRONG ANSWER
input |
---|
425818 |
correct output |
---|
652 1 |
user output |
---|
425756 652 1 |
Test 39
Verdict: WRONG ANSWER
input |
---|
729178 |
correct output |
---|
83 61 |
user output |
---|
728462 728750 729036 729072 83 61 |
Test 40
Verdict: WRONG ANSWER
input |
---|
863955 |
correct output |
---|
535 3 |
user output |
---|
862112 863296 863490 535 3 |
Test 41
Verdict: WRONG ANSWER
input |
---|
116086 |
correct output |
---|
340 1 |
user output |
---|
115940 340 1 |
Test 42
Verdict: WRONG ANSWER
input |
---|
612309 |
correct output |
---|
782 1 |
user output |
---|
612306 782 1 |
Test 43
Verdict: WRONG ANSWER
input |
---|
375142 |
correct output |
---|
228 7 |
user output |
---|
373932 374976 375060 228 7 |
Test 44
Verdict: WRONG ANSWER
input |
---|
852178 |
correct output |
---|
161 28 |
user output |
---|
851006 851136 852012 161 28 |
Test 45
Verdict: WRONG ANSWER
input |
---|
151667 |
correct output |
---|
156 6 |
user output |
---|
150932 151248 151632 156 6 |
Test 46
Verdict: WRONG ANSWER
input |
---|
196137 |
correct output |
---|
103 16 |
user output |
---|
195806 195936 196112 103 16 |
Test 47
Verdict: WRONG ANSWER
input |
---|
375254 |
correct output |
---|
612 1 |
user output |
---|
375156 612 1 |
Test 48
Verdict: WRONG ANSWER
input |
---|
451513 |
correct output |
---|
298 5 |
user output |
---|
450912 451248 451470 298 5 |
Test 49
Verdict: WRONG ANSWER
input |
---|
942864 |
correct output |
---|
122 46 |
user output |
---|
941870 942474 942480 942816 122 46 |
Test 50
Verdict: WRONG ANSWER
input |
---|
848035 |
correct output |
---|
215 17 |
user output |
---|
847320 847600 847960 215 17 |
Test 51
Verdict: WRONG ANSWER
input |
---|
727949226 |
correct output |
---|
1876 188 |
user output |
---|
727947380 727948032 1876 188 |
Test 52
Verdict: WRONG ANSWER
input |
---|
119540561 |
correct output |
---|
395 387 |
user output |
---|
119519556 119536720 119537340 119539800 119540016 ... |
Test 53
Verdict: WRONG ANSWER
input |
---|
168568700 |
correct output |
---|
447 430 |
user output |
---|
168545306 168547554 168556080 168557466 168562676 ... Truncated |
Test 54
Verdict: WRONG ANSWER
input |
---|
747828096 |
correct output |
---|
2098 158 |
user output |
---|
747776370 747803700 747809322 747819774 747824784 ... |
Test 55
Verdict: WRONG ANSWER
input |
---|
113886324 |
correct output |
---|
949 113 |
user output |
---|
113880912 113884230 113885694 949 113 |
Test 56
Verdict: WRONG ANSWER
input |
---|
544092912 |
correct output |
---|
2620 77 |
user output |
---|
544078950 544080930 544088778 544092780 2620 77 |
Test 57
Verdict: WRONG ANSWER
input |
---|
112927706 |
correct output |
---|
532 266 |
user output |
---|
112922502 112925820 112926310 112926366 112926576 ... |
Test 58
Verdict: WRONG ANSWER
input |
---|
562461747 |
correct output |
---|
1803 159 |
user output |
---|
562424940 562453662 562457940 562460250 562460274 ... |
Test 59
Verdict: WRONG ANSWER
input |
---|
930544437 |
correct output |
---|
7390 17 |
user output |
---|
930524520 930529798 930533736 930540234 930541410 ... |
Test 60
Verdict: WRONG ANSWER
input |
---|
612603672 |
correct output |
---|
1128 364 |
user output |
---|
612587250 612589822 612594684 612598250 612601800 ... |
Test 61
Verdict: WRONG ANSWER
input |
---|
575864416073 |
correct output |
---|
7427 5843 |
user output |
---|
575863187592 575864095296 575864291700 575864324210 575864350710 ... Truncated |
Test 62
Verdict: WRONG ANSWER
input |
---|
942935707814 |
correct output |
---|
63092 236 |
user output |
---|
942935189352 942935246448 942935623890 942935672880 942935681536 ... |
Test 63
Verdict: WRONG ANSWER
input |
---|
171264013251 |
correct output |
---|
14433 780 |
user output |
---|
171263959440 171263993830 171263998620 14433 780 |
Test 64
Verdict: WRONG ANSWER
input |
---|
76712165827 |
correct output |
---|
8381 978 |
user output |
---|
76712103930 76712120322 76712130900 76712133072 76712147862 ... |
Test 65
Verdict: WRONG ANSWER
input |
---|
161612205399 |
correct output |
---|
7527 2206 |
user output |
---|
161611638090 161612043390 161612044706 161612117568 161612120160 ... Truncated |
Test 66
Verdict: WRONG ANSWER
input |
---|
641183113758 |
correct output |
---|
50116 254 |
user output |
---|
641182145382 641182998526 641183079648 641183101680 50116 254 |
Test 67
Verdict: WRONG ANSWER
input |
---|
87822361843 |
correct output |
---|
24538 145 |
user output |
---|
87821840756 87822036930 87822137088 87822310422 87822315880 ... Truncated |
Test 68
Verdict: WRONG ANSWER
input |
---|
550401843854 |
correct output |
---|
14093 2372 |
user output |
---|
550401513990 550401776496 550401777618 550401783750 550401833140 ... |
Test 69
Verdict: WRONG ANSWER
input |
---|
56603972680 |
correct output |
---|
10404 499 |
user output |
---|
56603785140 56603960616 56603971188 10404 499 |
Test 70
Verdict: WRONG ANSWER
input |
---|
991404337870 |
correct output |
---|
109250 83 |
user output |
---|
991403554556 991403783440 991404130890 991404181794 991404208860 ... |
Test 71
Verdict: WRONG ANSWER
input |
---|
534149659344 |
correct output |
---|
53496 186 |
user output |
---|
534148300170 534149458914 534149568750 534149605262 534149642592 ... |
Test 72
Verdict: WRONG ANSWER
input |
---|
336010906011 |
correct output |
---|
183301 10 |
user output |
---|
336009773232 336009786910 336010352880 336010815600 336010896110 ... |
Test 73
Verdict: WRONG ANSWER
input |
---|
871714540470 |
correct output |
---|
214186 19 |
user output |
---|
871714459992 871714530470 214186 19 |
Test 74
Verdict: WRONG ANSWER
input |
---|
254659717917 |
correct output |
---|
17240 818 |
user output |
---|
254659006406 254659579776 254659618800 254659651400 254659680000 ... |
Test 75
Verdict: WRONG ANSWER
input |
---|
40507166127 |
correct output |
---|
3335 2196 |
user output |
---|
40506996432 40507118448 40507132160 40507151958 40507163460 ... |
Test 76
Verdict: WRONG ANSWER
input |
---|
445628406612 |
correct output |
---|
23039 811 |
user output |
---|
445627675362 445628385462 445628396576 445628401650 23039 811 |
Test 77
Verdict: WRONG ANSWER
input |
---|
822717753419 |
correct output |
---|
39363 524 |
user output |
---|
822717026406 822717514080 822717585450 822717630434 822717718044 ... |
Test 78
Verdict: WRONG ANSWER
input |
---|
40410210216 |
correct output |
---|
10096 382 |
user output |
---|
40410045506 40410118974 40410190856 40410191360 40410209216 ... |
Test 79
Verdict: WRONG ANSWER
input |
---|
366117794932 |
correct output |
---|
49165 151 |
user output |
---|
366117570852 366117740980 366117763032 366117792140 49165 151 |
Test 80
Verdict: WRONG ANSWER
input |
---|
657992849714 |
correct output |
---|
11698 3662 |
user output |
---|
657992713056 657992727308 657992835920 657992847360 11698 3662 |