Submission #1311247
Source Code Expand
eleva = input() answer = 0 length = len(eleva) for l in range(length): if l == 0 or l == length - 1: answer += 1 * (length - 1) else: if eleva[l] == "U": answer += (length - l - 1) * 1 + (length - (length - l - 1) - 1) * 2 else: answer += (length - l - 1) * 2 + (length - (length - l - 1) - 1) * 1 print(answer)
Submission Info
Submission Time | |
---|---|
Task | B - Evilator |
User | tomatohakase |
Language | PyPy3 (2.4.0) |
Score | 400 |
Code Size | 388 Byte |
Status | AC |
Exec Time | 187 ms |
Memory | 40432 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, s1.txt, s2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 187 ms | 40432 KB |
02.txt | AC | 179 ms | 39536 KB |
03.txt | AC | 178 ms | 39536 KB |
04.txt | AC | 177 ms | 39664 KB |
05.txt | AC | 175 ms | 39408 KB |
06.txt | AC | 171 ms | 39408 KB |
07.txt | AC | 176 ms | 39536 KB |
08.txt | AC | 177 ms | 39664 KB |
09.txt | AC | 169 ms | 38256 KB |
10.txt | AC | 164 ms | 38256 KB |
s1.txt | AC | 169 ms | 38256 KB |
s2.txt | AC | 172 ms | 38256 KB |