Submission #183335


Source Code Expand

import java.util.Arrays;
import java.util.Scanner;

public class Main {
	MyScanner sc = new MyScanner();
	Scanner sc2 = new Scanner(System.in);

	void run() {
		int[] a = new int[7];
		int[] b = new int[7];
		int ans = 0;
		for (int i = 0; i < 7; i++) {
			a[i] = sc.nextInt();
		}
		for (int i = 0; i < 7; i++) {
			b[i] = sc.nextInt();
		}
		for (int i = 0; i < 7; i++) {
			ans += Math.max(a[i], b[i]);
		}
		System.out.println(ans);
	}

	public static void main(String[] args) {
		new Main().run();
	}

	void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}

	void debug2(int[][] array) {
		for (int i = 0; i < array.length; i++) {
			for (int j = 0; j < array[i].length; j++) {
				System.out.print(array[i][j]);
			}
			System.out.println();
		}
	}

	class MyScanner {
		int nextInt() {
			try {
				int c = System.in.read();
				while (c != '-' && (c < '0' || '9' < c))
					c = System.in.read();
				if (c == '-')
					return -nextInt();
				int res = 0;
				do {
					res *= 10;
					res += c - '0';
					c = System.in.read();
				} while ('0' <= c && c <= '9');
				return res;
			} catch (Exception e) {
				return -1;
			}
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		String next() {
			try {
				StringBuilder res = new StringBuilder("");
				int c = System.in.read();
				while (Character.isWhitespace(c))
					c = System.in.read();
				do {
					res.append((char) c);
				} while (!Character.isWhitespace(c = System.in.read()));
				return res.toString();
			} catch (Exception e) {
				return null;
			}
		}
	}
}

Submission Info

Submission Time
Task A - ゴールドラッシュ
User suigingin
Language Java (OpenJDK 1.7.0)
Score 100
Code Size 1659 Byte
Status AC
Exec Time 902 ms
Memory 23328 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 19
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 647 ms 23328 KB
subtask0_sample-02.txt AC 659 ms 23092 KB
subtask0_sample-03.txt AC 611 ms 22964 KB
subtask0_sample-04.txt AC 588 ms 23080 KB
subtask1_01.txt AC 613 ms 23092 KB
subtask1_02.txt AC 660 ms 23088 KB
subtask1_03.txt AC 616 ms 23092 KB
subtask1_04.txt AC 902 ms 23092 KB
subtask1_05.txt AC 610 ms 23212 KB
subtask1_06.txt AC 718 ms 23112 KB
subtask1_07.txt AC 689 ms 23220 KB
subtask1_08.txt AC 640 ms 23092 KB
subtask1_09.txt AC 741 ms 23084 KB
subtask1_10.txt AC 630 ms 23088 KB
subtask1_11.txt AC 679 ms 23088 KB
subtask1_12.txt AC 716 ms 23128 KB
subtask1_13.txt AC 675 ms 23212 KB
subtask1_14.txt AC 801 ms 23092 KB
subtask1_15.txt AC 653 ms 23220 KB