結果

問題 No.369 足し間違い
ユーザー jimanojimano
提出日時 2018-01-13 16:56:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 575 bytes
コンパイル時間 3,762 ms
コンパイル使用メモリ 73,248 KB
実行使用メモリ 52,216 KB
最終ジャッジ日時 2023-08-25 15:50:05
合計ジャッジ時間 3,500 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
49,500 KB
testcase_01 AC 35 ms
47,408 KB
testcase_02 AC 35 ms
49,184 KB
testcase_03 AC 35 ms
49,348 KB
testcase_04 AC 70 ms
51,852 KB
testcase_05 AC 45 ms
48,552 KB
testcase_06 AC 73 ms
52,216 KB
testcase_07 AC 72 ms
52,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder.lv1;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No0369 {
	public static void main(String[] args) {
		try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
			int N = Integer.parseInt(br.readLine());
			String[] str = br.readLine().split(" ");
			int V = Integer.parseInt(br.readLine());
			int ans = 0;
			
			for (String s : str) {
				ans += Integer.parseInt(s);
			}
			System.out.println(ans - V);

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
0