Submission #183302
Source Code Expand
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { new Main().solve(); } void solve() throws Exception { FastScanner in = new FastScanner(System.in); int[] a = new int[7]; int[] b = new int[7]; for (int i = 0; i < 7; i++) { a[i] = in.nextInt(); } for (int i = 0; i < 7; i++) { b[i] = in.nextInt(); } int ret = 0; for (int i = 0; i < 7; i++) { ret += Math.max(a[i], b[i]); } System.out.println(ret); } class FastScanner { private InputStream _stream; private byte[] _buf = new byte[1024]; private int _curChar; private int _numChars; private StringBuilder _sb = new StringBuilder(); FastScanner(InputStream stream) { this._stream = stream; } public 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++]; } public String next() { int c = read(); while (isWhitespace(c)) { c = read(); } _sb.setLength(0); do { _sb.appendCodePoint(c); c = read(); } while (!isWhitespace(c)); return _sb.toString(); } public int nextInt() { return (int) nextLong(); } public long nextLong() { int c = read(); while (isWhitespace(c)) { c = read(); } int sgn = 1; if (c == '-') { sgn = -1; c = read(); } long res = 0; do { if (c < '0' || c > '9') throw new InputMismatchException(); res *= 10; res += c - '0'; c = read(); } while (!isWhitespace(c)); return res * sgn; } public boolean isWhitespace(int c) { return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1; } } } // // // // // // // // // // // // // // // // // // // // // // // // //
Submission Info
Submission Time | |
---|---|
Task | A - ゴールドラッシュ |
User | ixxa |
Language | Java (OpenJDK 1.7.0) |
Score | 100 |
Code Size | 2067 Byte |
Status | AC |
Exec Time | 740 ms |
Memory | 20804 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 | subtask0_sample-01.txt, subtask0_sample-02.txt, subtask0_sample-03.txt, subtask0_sample-04.txt, subtask1_01.txt, subtask1_02.txt, subtask1_03.txt, subtask1_04.txt, subtask1_05.txt, subtask1_06.txt, subtask1_07.txt, subtask1_08.txt, subtask1_09.txt, subtask1_10.txt, subtask1_11.txt, subtask1_12.txt, subtask1_13.txt, subtask1_14.txt, subtask1_15.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
subtask0_sample-01.txt | AC | 740 ms | 20804 KB |
subtask0_sample-02.txt | AC | 538 ms | 20568 KB |
subtask0_sample-03.txt | AC | 583 ms | 20684 KB |
subtask0_sample-04.txt | AC | 565 ms | 20576 KB |
subtask1_01.txt | AC | 558 ms | 20632 KB |
subtask1_02.txt | AC | 618 ms | 20556 KB |
subtask1_03.txt | AC | 537 ms | 20576 KB |
subtask1_04.txt | AC | 599 ms | 20580 KB |
subtask1_05.txt | AC | 566 ms | 20572 KB |
subtask1_06.txt | AC | 600 ms | 20564 KB |
subtask1_07.txt | AC | 644 ms | 20556 KB |
subtask1_08.txt | AC | 628 ms | 20568 KB |
subtask1_09.txt | AC | 678 ms | 20568 KB |
subtask1_10.txt | AC | 523 ms | 20572 KB |
subtask1_11.txt | AC | 668 ms | 20640 KB |
subtask1_12.txt | AC | 568 ms | 20684 KB |
subtask1_13.txt | AC | 535 ms | 20568 KB |
subtask1_14.txt | AC | 524 ms | 20572 KB |
subtask1_15.txt | AC | 607 ms | 20580 KB |