Submission #347269
Source Code Expand
import java.io.IOException; import java.io.InputStream; import java.io.PrintWriter; import java.util.Arrays; import java.util.HashMap; import java.util.InputMismatchException; import java.util.Map.Entry; public class Main { FastScanner in = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); public void run() { int[] a = in.nextIntArray(3); Arrays.sort(a); System.out.println(a[1]); } public static void main(String[] args) { new Main().run(); } public void mapDebug(int[][] a) { System.out.println("--------map display---------"); for (int i = 0; i < a.length; i++) { for (int j = 0; j < a[i].length; j++) { System.out.printf("%3d ", a[i][j]); } System.out.println(); } System.out.println("----------------------------"); System.out.println(); } public void debug(Object... obj) { System.out.println(Arrays.deepToString(obj)); } class FastScanner { private InputStream stream; private byte[] buf = new byte[1024]; private int curChar; private int numChars; public FastScanner(InputStream stream) { this.stream = stream; //stream = new FileInputStream(new File("dec.in")); } int read() { if (numChars == -1) throw new InputMismatchException(); if (curChar >= numChars) { curChar = 0; try { numChars = stream.read(buf); } catch (IOException e) { throw new InputMismatchException(); } if (numChars <= 0) return -1; } return buf[curChar++]; } boolean isSpaceChar(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } boolean isEndline(int c) { return c == '\n' || c == '\r' || c == -1; } int nextInt() { return Integer.parseInt(next()); } int[] nextIntArray(int n) { int[] array = new int[n]; for (int i = 0; i < n; i++) array[i] = nextInt(); return array; } int[][] nextIntMap(int n, int m) { int[][] map = new int[n][m]; for (int i = 0; i < n; i++) { map[i] = in.nextIntArray(m); } return map; } long nextLong() { return Long.parseLong(next()); } long[] nextLongArray(int n) { long[] array = new long[n]; for (int i = 0; i < n; i++) array[i] = nextLong(); return array; } long[][] nextLongMap(int n, int m) { long[][] map = new long[n][m]; for (int i = 0; i < n; i++) { map[i] = in.nextLongArray(m); } return map; } double nextDouble() { return Double.parseDouble(next()); } double[] nextDoubleArray(int n) { double[] array = new double[n]; for (int i = 0; i < n; i++) array[i] = nextDouble(); return array; } double[][] nextDoubleMap(int n, int m) { double[][] map = new double[n][m]; for (int i = 0; i < n; i++) { map[i] = in.nextDoubleArray(m); } return map; } String next() { int c = read(); while (isSpaceChar(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isSpaceChar(c)); return res.toString(); } String[] nextStringArray(int n) { String[] array = new String[n]; for (int i = 0; i < n; i++) array[i] = next(); return array; } String nextLine() { int c = read(); while (isEndline(c)) c = read(); StringBuilder res = new StringBuilder(); do { res.appendCodePoint(c); c = read(); } while (!isEndline(c)); return res.toString(); } } }
Submission Info
Submission Time | |
---|---|
Task | A - 高橋くんと年齢 |
User | hiro116s |
Language | Java (OpenJDK 1.7.0) |
Score | 100 |
Code Size | 3597 Byte |
Status | AC |
Exec Time | 413 ms |
Memory | 20784 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt |
All | 0.txt, 1.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 2.txt, 3.txt, 4.txt, 5.txt, 6.txt, 7.txt, 8.txt, 9.txt, subtask0_sample_01.txt, subtask0_sample_02.txt, subtask0_sample_03.txt, subtask0_sample_04.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0.txt | AC | 397 ms | 20784 KB |
1.txt | AC | 396 ms | 20660 KB |
10.txt | AC | 394 ms | 20720 KB |
11.txt | AC | 398 ms | 20768 KB |
12.txt | AC | 396 ms | 20656 KB |
13.txt | AC | 398 ms | 20676 KB |
14.txt | AC | 393 ms | 20736 KB |
15.txt | AC | 392 ms | 20680 KB |
16.txt | AC | 396 ms | 20708 KB |
17.txt | AC | 400 ms | 20632 KB |
18.txt | AC | 399 ms | 20712 KB |
19.txt | AC | 412 ms | 20644 KB |
2.txt | AC | 413 ms | 20604 KB |
3.txt | AC | 404 ms | 20732 KB |
4.txt | AC | 405 ms | 20664 KB |
5.txt | AC | 400 ms | 20688 KB |
6.txt | AC | 400 ms | 20672 KB |
7.txt | AC | 402 ms | 20636 KB |
8.txt | AC | 396 ms | 20660 KB |
9.txt | AC | 402 ms | 20660 KB |
subtask0_sample_01.txt | AC | 397 ms | 20748 KB |
subtask0_sample_02.txt | AC | 399 ms | 20648 KB |
subtask0_sample_03.txt | AC | 405 ms | 20632 KB |
subtask0_sample_04.txt | AC | 404 ms | 20612 KB |