Submission #179680
Source Code Expand
import static java.util.Arrays.deepToString; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.util.ArrayDeque; import java.util.Arrays; import java.util.Deque; import java.util.HashSet; import java.util.Set; public class Main { private static final boolean isDebug = false; int N; public final void solve() throws Throwable { startTime = System.currentTimeMillis(); pw.println(readBufInt() - readBufInt()); } private static long gcd(long n1, long n2) { return (n2 == 0)?n1:gcd(n2, n1%n2); } private static int gcd(int n1, int n2) { return (n2 == 0)?n1:gcd(n2, n1%n2); } private int brPos = 0; private int[] brBuf = null; private final int readBufInt() throws IOException { if (brBuf == null || brBuf.length == brPos) { brBuf = readIntArray(); brPos = 0; } return brBuf[brPos++]; } private final int readInt() throws IOException { return Integer.parseInt(br.readLine()); } private final long readLong() throws IOException { return Long.parseLong(br.readLine()); } private final int[] readIntArray() throws IOException { String[] s = readStrArray(); int cnt = s.length; int[] out = new int[cnt]; for (int i = 0; i < cnt; i++) out[i] = Integer.parseInt(s[i]); return out; } private final char[] readCharArray() throws IOException { String[] s = readStrArray(); int cnt = s.length; char[] out = new char[cnt]; for (int i = 0; i < cnt; i++) out[i] = s[i].charAt(0); return out; } private final long[] readLongArray() throws IOException { String[] s = readStrArray(); int cnt = s.length; long[] out = new long[cnt]; for (int i = 0; i < cnt; i++) out[i] = Long.parseLong(s[i]); return out; } private final String[] readStrArray() throws IOException { String[] s = br.readLine().split(" "); return s; } static long startTime; public static void main(String[] args) { Main app = new Main(); try { app.br = new BufferedReader(new InputStreamReader(System.in)); app.solve(); } catch(Throwable e) { e.printStackTrace(); } finally { try { app.br.close();} catch (Exception igunore) {} } d(System.currentTimeMillis() - startTime + " ms"); pw.flush(); pw.close(); } static final void d(Object ... o) { if (isDebug) pw.println(deepToString(o)); } BufferedReader br = null; static PrintWriter pw = new PrintWriter(System.out); }
Submission Info
Submission Time | |
---|---|
Task | A - 積雪深差 |
User | tochukaso |
Language | Java (OpenJDK 1.7.0) |
Score | 100 |
Code Size | 2907 Byte |
Status | AC |
Exec Time | 823 ms |
Memory | 20700 KB |
Judge Result
Set Name | all | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
all | 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, test_01.txt, test_02.txt, test_03.txt, test_04.txt, test_05.txt, test_06.txt, test_07.txt, test_08.txt, test_09.txt, test_10.txt, test_11.txt, test_12.txt, test_13.txt, test_14.txt, test_15.txt, test_16.txt, test_17.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_01.txt | AC | 823 ms | 20544 KB |
00_sample_02.txt | AC | 399 ms | 20696 KB |
00_sample_03.txt | AC | 388 ms | 20564 KB |
test_01.txt | AC | 388 ms | 20564 KB |
test_02.txt | AC | 382 ms | 20688 KB |
test_03.txt | AC | 390 ms | 20572 KB |
test_04.txt | AC | 387 ms | 20572 KB |
test_05.txt | AC | 385 ms | 20564 KB |
test_06.txt | AC | 384 ms | 20524 KB |
test_07.txt | AC | 390 ms | 20556 KB |
test_08.txt | AC | 384 ms | 20580 KB |
test_09.txt | AC | 390 ms | 20568 KB |
test_10.txt | AC | 389 ms | 20684 KB |
test_11.txt | AC | 386 ms | 20700 KB |
test_12.txt | AC | 401 ms | 20700 KB |
test_13.txt | AC | 390 ms | 20700 KB |
test_14.txt | AC | 386 ms | 20560 KB |
test_15.txt | AC | 391 ms | 20700 KB |
test_16.txt | AC | 390 ms | 20556 KB |
test_17.txt | AC | 392 ms | 20700 KB |