Task: | Lehmät |
Sender: | eetumaenpaa |
Submission time: | 2022-10-31 00:44:05 +0200 |
Language: | Python3 (CPython3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | WRONG ANSWER | 0.02 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.02 s | 1, 2 | details |
#3 | RUNTIME ERROR | 0.02 s | 1, 2 | details |
#4 | WRONG ANSWER | 0.02 s | 1, 2 | details |
#5 | WRONG ANSWER | 0.02 s | 1, 2 | details |
#6 | WRONG ANSWER | 0.02 s | 2 | details |
#7 | WRONG ANSWER | 0.02 s | 2 | details |
#8 | WRONG ANSWER | 0.02 s | 2 | details |
#9 | WRONG ANSWER | 0.02 s | 2 | details |
Code
[width, height] = [int(x) for x in input().split(" ")] rows = [input() for x in range(height)] min_y = min([y for y in range(height) if rows[y].count("*") > 0]) max_y = max([y for y in range(height) if rows[y].count("*") > 0]) min_x = min([x for x in range(width) if rows[min_y][x] == "*"]) max_x = max([x for x in range(width) if rows[min_y][x] == "*"]) print(min_y, max_y, min_x, max_x) cow_count = 0 for x in range(min_x, max_x + 1): for y in range(min_y, max_y + 1): if rows[y][x] == "@": cow_count += 1 print(cow_count)
Test details
Test 1
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
3 3 *** *.* *** |
correct output |
---|
0 |
user output |
---|
0 2 0 2 0 |
Test 2
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
3 3 *** *@* *** |
correct output |
---|
1 |
user output |
---|
0 2 0 2 1 |
Test 3
Group: 1, 2
Verdict: RUNTIME ERROR
input |
---|
5 10 ...@...... ..******.. @.*@@@@*.@ ..******.. ... |
correct output |
---|
4 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "/box/input/code.py", line 2, in <module> ro...
Test 4
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 10 @@...@.@@@ ..@@.@@..@ @.*******@ ..*@....*. ... |
correct output |
---|
11 |
user output |
---|
2 8 2 8 11 |
Test 5
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 10 ********** *@@@@@@@@* *@@@@@@@@* *@@@@@@@@* ... |
correct output |
---|
64 |
user output |
---|
0 9 0 9 64 |
Test 6
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 .........................@....... |
correct output |
---|
60 |
user output |
---|
6 93 10 91 60 |
Test 7
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 ..@@..........@......@....@@..... |
correct output |
---|
1507 |
user output |
---|
9 94 5 94 1507 |
Test 8
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 .@..@@..@@.@..@..@..@@..@..@..... |
correct output |
---|
3348 |
user output |
---|
10 91 9 94 3348 |
Test 9
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |
correct output |
---|
7225 |
user output |
---|
8 94 5 91 7225 |