CSES - Datatähti 2023 alku - Results
Submission details
Task:Lehmät
Sender:ekeso
Submission time:2022-10-31 12:17:44 +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


def main():

    lista = []

    nums = input().split(" ")
    n = int(nums[0])
    m = int(nums[1])

    lines = []

    while(True):
        inp = input()

        if inp == "":
            break

        lines.append(inp)

    count = 0
    aitauksessa = False
    for line in lines:
        if not aitauksessa:
            for char in line:
                if char == "*":
                    aitauksessa = True
                    break
            continue
        if line.count("*") > 2:
            break
        line = line.split("*")
        count += line[1].count("@")

    print(count)



if __name__ == "__main__":
    main()

Test details

Test 1

Group: 1, 2

Verdict:

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

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 2

Group: 1, 2

Verdict:

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

correct output
1

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 3

Group: 1, 2

Verdict:

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

correct output
4

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 4

Group: 1, 2

Verdict:

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

correct output
11

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 5

Group: 1, 2

Verdict:

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

correct output
64

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 6

Group: 2

Verdict:

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

correct output
60

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 7

Group: 2

Verdict:

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

correct output
1507

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 8

Group: 2

Verdict:

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

correct output
3348

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...

Test 9

Group: 2

Verdict:

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

correct output
7225

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 40, in <module>
    m...