結果

問題 No.369 足し間違い
ユーザー tentententen
提出日時 2020-11-11 14:29:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 251 ms / 2,000 ms
コード長 319 bytes
コンパイル時間 2,139 ms
コンパイル使用メモリ 72,008 KB
実行使用メモリ 60,124 KB
最終ジャッジ日時 2023-09-30 00:31:04
合計ジャッジ時間 4,316 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,044 KB
testcase_01 AC 126 ms
55,980 KB
testcase_02 AC 129 ms
56,052 KB
testcase_03 AC 134 ms
55,968 KB
testcase_04 AC 241 ms
59,192 KB
testcase_05 AC 191 ms
58,068 KB
testcase_06 AC 240 ms
59,064 KB
testcase_07 AC 251 ms
60,124 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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