結果

問題 No.369 足し間違い
ユーザー HEGO55HEGO55
提出日時 2017-05-17 17:51:08
言語 Java19
(openjdk 21)
結果
AC  
実行時間 262 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 3,416 ms
コンパイル使用メモリ 74,564 KB
実行使用メモリ 60,972 KB
最終ジャッジ日時 2023-10-17 23:58:44
合計ジャッジ時間 5,845 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
57,400 KB
testcase_01 AC 135 ms
57,404 KB
testcase_02 AC 132 ms
57,372 KB
testcase_03 AC 144 ms
57,096 KB
testcase_04 AC 262 ms
58,824 KB
testcase_05 AC 192 ms
59,764 KB
testcase_06 AC 246 ms
60,496 KB
testcase_07 AC 262 ms
60,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Test39{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
		
        int N = sc.nextInt();
		int[] num = new int[N];
		int sum = 0;
		
		for(int i=0; i<num.length; i++){
			num[i] = sc.nextInt();
			sum += num[i];
		}
		
		int V = sc.nextInt();
		
		System.out.println(sum-V);
    }
}
0