CSES - Datatähti 2023 alku - Results
Submission details
Task:Lehmät
Sender:Nikita_Voloshko
Submission time:2022-11-01 20:29:32 +0200
Language:Python3 (CPython3)
Status:READY
Result:0
Feedback
groupverdictscore
#10
#20
Test results
testverdicttimegroup
#10.02 s1, 2details
#20.02 s1, 2details
#30.02 s1, 2details
#40.02 s1, 2details
#50.02 s1, 2details
#60.02 s2details
#70.02 s2details
#80.02 s2details
#90.02 s2details

Code

n = input()
n = n.split(' ')
d = []
count = 0
for g in range(0, int(n[0])):
    g = str(g)
    b = 'v',g
    d.append(b)
    g = int(g)
    d[g] = input()
for v in range(0, len(d)):
    arrange = list(d[v])
    for x in range( len(arrange),0,-1):
        x = x-1
        if(arrange[x] == '*'):
            if(arrange[x-1] == '*'):
                break
            del arrange[x]
            x = x-1
            for x in reversed(list(enumerate(arrange))):
                if x[1] == '@':
                    count += 1
                elif x[1] == '*':
                    break
            break
        del arrange[x]    
print('count = ',count)

Test details

Test 1

Group: 1, 2

Verdict:

input
3 3
***
*.*
***

correct output
0

user output
count =  0

Test 2

Group: 1, 2

Verdict:

input
3 3
***
*@*
***

correct output
1

user output
count =  1

Test 3

Group: 1, 2

Verdict:

input
5 10
...@......
..******..
@.*@@@@*.@
..******..
...

correct output
4

user output
count =  4

Test 4

Group: 1, 2

Verdict:

input
10 10
@@...@.@@@
..@@.@@..@
@.*******@
..*@....*.
...

correct output
11

user output
count =  11

Test 5

Group: 1, 2

Verdict:

input
10 10
**********
*@@@@@@@@*
*@@@@@@@@*
*@@@@@@@@*
...

correct output
64

user output
count =  64

Test 6

Group: 2

Verdict:

input
100 100
.........................@.......

correct output
60

user output
count =  60

Test 7

Group: 2

Verdict:

input
100 100
..@@..........@......@....@@.....

correct output
1507

user output
count =  1507

Test 8

Group: 2

Verdict:

input
100 100
.@..@@..@@.@..@..@..@@..@..@.....

correct output
3348

user output
count =  3348

Test 9

Group: 2

Verdict:

input
100 100
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...

correct output
7225

user output
count =  7225