Submission #1364003
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String sub; int max = -1; sub = s.substring(s.indexOf("A"), s.lastIndexOf("Z") + 1); max = sub.length(); System.out.println(max); } }
Submission Info
Submission Time | |
---|---|
Task | B - A to Z String |
User | kouta1612 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 200 |
Code Size | 312 Byte |
Status | AC |
Exec Time | 165 ms |
Memory | 27832 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 | 94 ms | 20820 KB |
00_example_02.txt | AC | 103 ms | 20948 KB |
00_example_03.txt | AC | 93 ms | 21844 KB |
01.txt | AC | 155 ms | 25556 KB |
02.txt | AC | 162 ms | 26508 KB |
03.txt | AC | 143 ms | 23740 KB |
04.txt | AC | 142 ms | 24532 KB |
05.txt | AC | 158 ms | 26324 KB |
06.txt | AC | 158 ms | 25868 KB |
07.txt | AC | 165 ms | 27832 KB |
08.txt | AC | 152 ms | 25756 KB |
09.txt | AC | 155 ms | 23892 KB |