結果

問題 No.369 足し間違い
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 17:45:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 269 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 2,404 ms
コンパイル使用メモリ 78,008 KB
実行使用メモリ 47,216 KB
最終ジャッジ日時 2024-04-16 18:24:06
合計ジャッジ時間 4,145 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
41,020 KB
testcase_01 AC 131 ms
41,412 KB
testcase_02 AC 130 ms
41,708 KB
testcase_03 AC 132 ms
41,580 KB
testcase_04 AC 243 ms
46,688 KB
testcase_05 AC 193 ms
43,268 KB
testcase_06 AC 250 ms
46,544 KB
testcase_07 AC 269 ms
47,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main(String[] args) {
		int n = sc.nextInt();
		int total = 0;
		for (int i=0; i<n; i++) {
			total += sc.nextInt();
		}
		int v = sc.nextInt();
		System.out.println(total-v);
	}
}
0