Submission #3020055
Source Code Expand
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] a = new int[n]; int i = 0; for(i = 0; i < n; i++) { a[i] = sc.nextInt(); } for (i = n-1; i >= 0; i -= 2) { System.out.print(a[i] + " "); } if(i == -2) { for (i = 1; i < n; i += 2) { System.out.print(a[i] + " "); } }else if(i == -1) { for (i = 0; i < n; i += 2) { System.out.print(a[i] + " "); } } System.out.println(); } }
Submission Info
Submission Time | |
---|---|
Task | C - pushpush |
User | harunatsu |
Language | Java8 (OpenJDK 1.8.0) |
Score | 300 |
Code Size | 605 Byte |
Status | AC |
Exec Time | 1124 ms |
Memory | 90800 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample1.txt, sample2.txt, sample3.txt, sample4.txt |
All | even_0.txt, even_1.txt, even_2.txt, even_3.txt, odd_0.txt, odd_1.txt, odd_2.txt, odd_3.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
even_0.txt | AC | 1110 ms | 87860 KB |
even_1.txt | AC | 1112 ms | 88848 KB |
even_2.txt | AC | 1124 ms | 89808 KB |
even_3.txt | AC | 1083 ms | 89832 KB |
odd_0.txt | AC | 1084 ms | 89356 KB |
odd_1.txt | AC | 1120 ms | 89948 KB |
odd_2.txt | AC | 1113 ms | 90800 KB |
odd_3.txt | AC | 1113 ms | 89836 KB |
sample1.txt | AC | 91 ms | 18772 KB |
sample2.txt | AC | 92 ms | 19412 KB |
sample3.txt | AC | 92 ms | 21076 KB |
sample4.txt | AC | 92 ms | 20692 KB |