Submission #2252570
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int k = 0; String[] rs = new String[100]; String s = scan.next(); String[] str = s.split(""); for(int i = 0; i < str.length; i++) { if(i % 2 == 0) { rs[k] = str[i]; k++; } } String[] last = new String[k]; for(int i = 0; i < k; i++) { last[i] = rs[i]; } System.out.println(String.join("", last)); scan.close(); } }
Submission Info
Submission Time | |
---|---|
Task | B - OddString |
User | ne290170 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 0 |
Code Size | 503 Byte |
Status | RE |
Exec Time | 196 ms |
Memory | 31120 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | AC | 90 ms | 21844 KB |
0_001.txt | AC | 89 ms | 19668 KB |
0_002.txt | AC | 88 ms | 19796 KB |
0_003.txt | AC | 89 ms | 18644 KB |
1_004.txt | AC | 90 ms | 23124 KB |
1_005.txt | AC | 89 ms | 21716 KB |
1_006.txt | RE | 188 ms | 31120 KB |
1_007.txt | RE | 196 ms | 30684 KB |