結果

問題 No.369 足し間違い
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 17:45:31
言語 Java19
(openjdk 21)
結果
AC  
実行時間 258 ms / 2,000 ms
コード長 286 bytes
コンパイル時間 2,183 ms
コンパイル使用メモリ 71,380 KB
実行使用メモリ 59,616 KB
最終ジャッジ日時 2023-07-29 12:06:00
合計ジャッジ時間 5,642 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
57,616 KB
testcase_01 AC 129 ms
55,876 KB
testcase_02 AC 128 ms
55,524 KB
testcase_03 AC 134 ms
55,676 KB
testcase_04 AC 243 ms
58,292 KB
testcase_05 AC 198 ms
58,224 KB
testcase_06 AC 245 ms
59,616 KB
testcase_07 AC 258 ms
59,372 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