Task: | Pallo |
Sender: | okkokko |
Submission time: | 2022-01-22 13:27:09 +0200 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.05 s | 1, 2, 3 | details |
#2 | TIME LIMIT EXCEEDED | -- | 2, 3 | details |
#3 | TIME LIMIT EXCEEDED | -- | 3 | details |
Code
def I(): return map(int, input().split()) def main(): t = int(input()) for _ in range(t): n, m, k = I() # jos vastakkaisten seinien välissä on n ruutua, pallo koskettaa jompaakumpaa askeleella x jos x%(n-1)==0 # jos pallo koskettaa kahta seinää samanaikaisesti, sitä ei pidä laskea kahteen kertaan # bounces = 0 # for i in range(1, k + 1): # if i % (n - 1) == 0: # bounces += 1 # if i % (m - 1) == 0: # bounces += 1 # if i % (n - 1) == 0 and i % (m - 1) == 0: # bounces -= 1 # print(bounces) bounces = 0 for i in range(1, k + 1): if i % (n - 1) == 0: bounces += 1 if i % (m - 1) == 0: bounces += 1 if i % ((n - 1) * (m - 1)) == 0: bounces -= 1 print(bounces) pass if __name__ == "__main__": main()
Test details
Test 1
Group: 1, 2, 3
Verdict: WRONG ANSWER
input |
---|
100 10 5 76 9 8 78 8 6 49 3 3 94 ... |
correct output |
---|
25 19 15 47 8 ... |
user output |
---|
25 19 15 71 11 ... Truncated |
Test 2
Group: 2, 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
1000 7 5 99033171167123849 6 8 472883555390027162 9 10 258937093512465880 10 6 691774305483997493 ... |
correct output |
---|
33011057055707949 148620545979722822 57541576336103529 199845910473154830 52151060432923288 ... |
user output |
---|
(empty) |
Test 3
Group: 3
Verdict: TIME LIMIT EXCEEDED
input |
---|
1000 816332614 86098803 33572721929... |
correct output |
---|
4310587870 45982113074 1550250683 717639357 3282221941 ... |
user output |
---|
(empty) |