Task: | Peli |
Sender: | rasastusni |
Submission time: | 2020-11-07 22:31:54 +0200 |
Language: | Python2 (PyPy2) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 35 |
#2 | ACCEPTED | 65 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.04 s | 1, 2 | details |
#2 | ACCEPTED | 0.04 s | 2 | details |
Code
#!/usr/bin/env python t = int(raw_input()) for x in range(t): thing = raw_input() first = thing.find('P') second = first + 1 + thing[first+1:].find('P') print (second - first) % 2 + 1