Submission #1178222
Source Code Expand
using System; class AtCoder { static int Solve(string s) { int aIndex = 20000; int zIndex = -1; int i = 0; foreach (char c in s) { if (c == 'A') { aIndex = Math.Min(aIndex, i); } else if (c == 'Z') { zIndex = i; } ++i; } return (zIndex - aIndex) + 1; } static void Main() { string s = Console.ReadLine(); int answer = Solve(s); Console.WriteLine(answer); } }
Submission Info
Submission Time | |
---|---|
Task | B - A to Z String |
User | tarunama |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 622 Byte |
Status | WA |
Exec Time | 23 ms |
Memory | 11616 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt |
All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 21 ms | 11092 KB |
00_example_02.txt | AC | 21 ms | 9044 KB |
00_example_03.txt | AC | 21 ms | 11092 KB |
01.txt | AC | 22 ms | 9568 KB |
02.txt | AC | 22 ms | 9440 KB |
03.txt | AC | 21 ms | 9184 KB |
04.txt | AC | 21 ms | 9184 KB |
05.txt | AC | 22 ms | 9568 KB |
06.txt | WA | 22 ms | 9568 KB |
07.txt | AC | 23 ms | 9568 KB |
08.txt | AC | 23 ms | 9568 KB |
09.txt | AC | 23 ms | 11616 KB |