Submission #1178530
Source Code Expand
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); String s = sc.next(); int x = s.indexOf("A"); int y = s.lastIndexOf("Z"); System.out.println(y - x + 1); } }
Submission Info
Submission Time | |
---|---|
Task | B - A to Z String |
User | ne280035b |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 320 Byte |
Status | AC |
Exec Time | 156 ms |
Memory | 26564 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 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 | 90 ms | 19668 KB |
00_example_02.txt | AC | 88 ms | 19796 KB |
00_example_03.txt | AC | 88 ms | 19156 KB |
01.txt | AC | 150 ms | 24632 KB |
02.txt | AC | 144 ms | 23280 KB |
03.txt | AC | 132 ms | 22996 KB |
04.txt | AC | 133 ms | 23636 KB |
05.txt | AC | 147 ms | 25868 KB |
06.txt | AC | 154 ms | 24504 KB |
07.txt | AC | 146 ms | 23528 KB |
08.txt | AC | 156 ms | 26564 KB |
09.txt | AC | 151 ms | 25168 KB |