Submission #74306502
Source Code Expand
import java.io.*;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
InputReader reader = new InputReader(System.in);
PrintWriter writer = new PrintWriter(System.out, false);
int N = reader.nextInt();
for (int i = N; i >= 1; i--) {
writer.print(i);
if (i != 1) writer.print(",");
}
writer.close();
System.exit(0);
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public long nextLong() {
return Long.parseLong(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
public String nextLine() {
String str = "";
try {
str = reader.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - 3,2,1,GO |
| User | UttamS |
| Language | Java24 (OpenJDK 24.0.2) |
| Score | 100 |
| Code Size | 1670 Byte |
| Status | AC |
| Exec Time | 46 ms |
| Memory | 39304 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 46 ms | 39016 KiB |
| random_02.txt | AC | 44 ms | 39152 KiB |
| random_03.txt | AC | 44 ms | 39304 KiB |
| random_04.txt | AC | 43 ms | 38912 KiB |
| random_05.txt | AC | 44 ms | 39236 KiB |
| random_06.txt | AC | 46 ms | 39104 KiB |
| sample_01.txt | AC | 44 ms | 38912 KiB |
| sample_02.txt | AC | 43 ms | 38872 KiB |
| sample_03.txt | AC | 44 ms | 39068 KiB |