Task: | Robotti |
Sender: | Belinda |
Submission time: | 2024-11-08 21:30:53 +0200 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#3 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#4 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#5 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#6 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#7 | WRONG ANSWER | 0.06 s | 1, 2 | details |
#8 | WRONG ANSWER | 0.07 s | 1, 2 | details |
#9 | WRONG ANSWER | 0.08 s | 1, 2 | details |
#10 | WRONG ANSWER | 0.07 s | 1, 2 | details |
#11 | WRONG ANSWER | 0.07 s | 1, 2 | details |
#12 | WRONG ANSWER | 0.08 s | 2 | details |
#13 | WRONG ANSWER | 0.07 s | 2 | details |
#14 | WRONG ANSWER | 0.18 s | 2 | details |
#15 | WRONG ANSWER | 0.23 s | 2 | details |
#16 | WRONG ANSWER | 0.29 s | 2 | details |
#17 | WRONG ANSWER | 0.05 s | 2 | details |
#18 | WRONG ANSWER | 0.67 s | 2 | details |
#19 | TIME LIMIT EXCEEDED | -- | 2 | details |
#20 | TIME LIMIT EXCEEDED | -- | 2 | details |
#21 | WRONG ANSWER | 0.05 s | 2 | details |
#22 | WRONG ANSWER | 0.12 s | 2 | details |
#23 | TIME LIMIT EXCEEDED | -- | 2 | details |
#24 | TIME LIMIT EXCEEDED | -- | 2 | details |
Code
huoneet_maara = int(input()) rakennus = input() def simuloi(): huone = 1 kolikkohuone = [] sijainti = [] counter = 0 askel = 0 for kirjain in rakennus: if kirjain=='*': kolikkohuone.append(huone) if kirjain=='R': sijainti.append(huone) huone = huone + 1 print (kolikkohuone, huone, sijainti) while len(sijainti) == 1 and len(kolikkohuone) != 0: lahin_kolikko = [kolikkohuone[min(range(len(kolikkohuone)), key=lambda i: abs(kolikkohuone[i] - sijainti[0]))]] #sum(lahin_kolikko, []) print(lahin_kolikko) if len(lahin_kolikko) == 1: kolikkohuone.remove(lahin_kolikko[0]) counter = counter + 1 askel = askel + abs(lahin_kolikko[0]- sijainti[0]) sijainti = lahin_kolikko return kolikkohuone, sijainti, counter, askel print(simuloi())
Test details
Test 1
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1 R |
correct output |
---|
0 0 |
user output |
---|
[] 2 [1] ([], [1], 0, 0) |
Test 2
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 ...R...... |
correct output |
---|
0 0 |
user output |
---|
[] 11 [4] ([], [4], 0, 0) |
Test 3
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 **.R...*** |
correct output |
---|
12 5 |
user output |
---|
[1, 2, 8, 9, 10] 11 [4] [2] [1] [8] [9] ... |
Test 4
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 ***R****** |
correct output |
---|
0 0 |
user output |
---|
[1, 2, 3, 5, 6, 7, 8, 9, 10] 1... |
Test 5
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 R................................ |
correct output |
---|
947 9 |
user output |
---|
[149, 227, 258, 429, 495, 574,... |
Test 6
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 ................................. |
correct output |
---|
886 9 |
user output |
---|
[114, 232, 530, 612, 709, 713,... |
Test 7
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 .....*..*....**..**..*......*.... |
correct output |
---|
1287 400 |
user output |
---|
[6, 9, 14, 15, 18, 19, 22, 29,... |
Test 8
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 ************.*****************... |
correct output |
---|
0 0 |
user output |
---|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10... |
Test 9
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 ******************************... |
correct output |
---|
0 0 |
user output |
---|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10... |
Test 10
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 R*****************************... |
correct output |
---|
999 999 |
user output |
---|
[2, 3, 4, 5, 6, 7, 8, 9, 10, 1... |
Test 11
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
1000 ******************************... |
correct output |
---|
999 999 |
user output |
---|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10... |
Test 12
Group: 2
Verdict: WRONG ANSWER
input |
---|
10000 .......**........*...........*... |
correct output |
---|
10971 999 |
user output |
---|
[8, 9, 18, 30, 42, 57, 62, 71,... |
Test 13
Group: 2
Verdict: WRONG ANSWER
input |
---|
10000 *..*....*......*.....*..*........ |
correct output |
---|
9999 999 |
user output |
---|
[1, 4, 9, 16, 22, 25, 36, 44, ... |
Test 14
Group: 2
Verdict: WRONG ANSWER
input |
---|
10000 *.*.*...**.*...*....**.**.**..... |
correct output |
---|
18766 5000 |
user output |
---|
[1, 3, 5, 9, 10, 12, 16, 21, 2... |
Test 15
Group: 2
Verdict: WRONG ANSWER
input |
---|
10000 R*****************************... |
correct output |
---|
9999 9999 |
user output |
---|
[2, 3, 4, 5, 6, 7, 8, 9, 10, 1... |
Test 16
Group: 2
Verdict: WRONG ANSWER
input |
---|
10000 ******************************... |
correct output |
---|
9999 9999 |
user output |
---|
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10... |
Test 17
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 ................................. |
correct output |
---|
0 0 |
user output |
---|
[] 200001 [100001] ([], [100001], 0, 0) |
Test 18
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 ................................. |
correct output |
---|
299934 10000 |
user output |
---|
[46, 49, 78, 81, 82, 104, 111,... |
Test 19
Group: 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
200000 **.***....**..**.....***.*..*.... |
correct output |
---|
299998 100000 |
user output |
---|
(empty) |
Test 20
Group: 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
200000 ******************************... |
correct output |
---|
0 0 |
user output |
---|
(empty) |
Test 21
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 R................................ |
correct output |
---|
133765 3 |
user output |
---|
[70143, 84565, 133766] 200001 ... |
Test 22
Group: 2
Verdict: WRONG ANSWER
input |
---|
200000 R................................ |
correct output |
---|
199982 5000 |
user output |
---|
[67, 82, 107, 231, 242, 279, 2... |
Test 23
Group: 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
200000 R*****************************... |
correct output |
---|
199999 199999 |
user output |
---|
(empty) |
Test 24
Group: 2
Verdict: TIME LIMIT EXCEEDED
input |
---|
200000 ******************************... |
correct output |
---|
199999 199999 |
user output |
---|
(empty) |