Submission #75837043
Source Code Expand
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
String s=sc.next();
int n=sc.nextInt();
int beginIndex=n;
int endIndex=s.length()-n;
String newString=s.substring(beginIndex,endIndex);
System.out.println(newString);
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Chompers |
| User | renu_ |
| Language | Java24 (OpenJDK 24.0.2) |
| Score | 100 |
| Code Size | 356 Byte |
| Status | AC |
| Exec Time | 82 ms |
| Memory | 40536 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt |
| All | 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-01.txt | AC | 82 ms | 40328 KiB |
| 00-sample-02.txt | AC | 72 ms | 40428 KiB |
| 00-sample-03.txt | AC | 72 ms | 40276 KiB |
| 01-01.txt | AC | 73 ms | 40432 KiB |
| 01-02.txt | AC | 72 ms | 39984 KiB |
| 01-03.txt | AC | 74 ms | 40296 KiB |
| 01-04.txt | AC | 74 ms | 40300 KiB |
| 01-05.txt | AC | 75 ms | 39900 KiB |
| 01-06.txt | AC | 74 ms | 40000 KiB |
| 01-07.txt | AC | 75 ms | 40536 KiB |
| 01-08.txt | AC | 71 ms | 40020 KiB |
| 01-09.txt | AC | 72 ms | 39804 KiB |