Submission #1311257
Source Code Expand
s = chomp(readline()) n = length(s) ans = n * (n - 1) for i in 1:length(s) if s[i] == 'U' ans += i - 1 else ans += n - i end end println(ans)
Submission Info
Submission Time | |
---|---|
Task | B - Evilator |
User | Naoki_M_ |
Language | Julia (0.5.0) |
Score | 400 |
Code Size | 181 Byte |
Status | AC |
Exec Time | 874 ms |
Memory | 179456 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 | 874 ms | 179456 KB |
02.txt | AC | 362 ms | 116400 KB |
03.txt | AC | 361 ms | 115764 KB |
04.txt | AC | 358 ms | 119560 KB |
05.txt | AC | 359 ms | 119500 KB |
06.txt | AC | 360 ms | 117364 KB |
07.txt | AC | 362 ms | 116660 KB |
08.txt | AC | 363 ms | 118868 KB |
09.txt | AC | 320 ms | 107464 KB |
10.txt | AC | 320 ms | 106504 KB |
s1.txt | AC | 322 ms | 105276 KB |
s2.txt | AC | 320 ms | 105748 KB |