Task: | Lehmät |
Sender: | psavela |
Submission time: | 2022-11-06 22:46:30 +0200 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | 0 |
group | verdict | score |
---|---|---|
#1 | WRONG ANSWER | 0 |
#2 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.04 s | 1, 2 | details |
#2 | WRONG ANSWER | 0.04 s | 1, 2 | details |
#3 | ACCEPTED | 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.05 s | 2 | details |
#7 | WRONG ANSWER | 0.05 s | 2 | details |
#8 | WRONG ANSWER | 0.05 s | 2 | details |
#9 | WRONG ANSWER | 0.05 s | 2 | details |
Code
firstline = input() rivicount = int(firstline.split(" ")[0]) karttalist = [] for _ in range(rivicount): karttalist.append(input()) for rivi in karttalist: aita = False for char in rivi: if char == "*": aita = True if aita == False: karttalist.remove(rivi) #print(len(karttalist)) tilavasen = 0 aitavasen = False tilaoikea = 0 for char in karttalist[0]: if aitavasen == False: if(char != "*"): tilavasen = tilavasen + 1 else: aitavasen = True else: if(char == "*"): continue else: tilaoikea = tilaoikea + 1 rivinum = 0 for rivi in karttalist: karttalist[rivinum] = karttalist[rivinum][tilavasen:] karttalist[rivinum] = karttalist[rivinum][:-tilaoikea] rivinum = rivinum + 1 cownum = 0 for rivi in karttalist: for char in rivi: if(char == "@"): cownum = cownum + 1 print(cownum)
Test details
Test 1
Group: 1, 2
Verdict: ACCEPTED
input |
---|
3 3 *** *.* *** |
correct output |
---|
0 |
user output |
---|
0 |
Test 2
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
3 3 *** *@* *** |
correct output |
---|
1 |
user output |
---|
0 |
Test 3
Group: 1, 2
Verdict: ACCEPTED
input |
---|
5 10 ...@...... ..******.. @.*@@@@*.@ ..******.. ... |
correct output |
---|
4 |
user output |
---|
4 |
Test 4
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 10 @@...@.@@@ ..@@.@@..@ @.*******@ ..*@....*. ... |
correct output |
---|
11 |
user output |
---|
0 |
Test 5
Group: 1, 2
Verdict: WRONG ANSWER
input |
---|
10 10 ********** *@@@@@@@@* *@@@@@@@@* *@@@@@@@@* ... |
correct output |
---|
64 |
user output |
---|
0 |
Test 6
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 .........................@....... |
correct output |
---|
60 |
user output |
---|
0 |
Test 7
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 ..@@..........@......@....@@..... |
correct output |
---|
1507 |
user output |
---|
0 |
Test 8
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 .@..@@..@@.@..@..@..@@..@..@..... |
correct output |
---|
3348 |
user output |
---|
0 |
Test 9
Group: 2
Verdict: WRONG ANSWER
input |
---|
100 100 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@... |
correct output |
---|
7225 |
user output |
---|
0 |