結果

問題 No.369 足し間違い
ユーザー Cyberdog-しばいぬ-Cyberdog-しばいぬ-
提出日時 2019-10-11 22:56:14
言語 Java21
(openjdk 21)
結果
AC  
実行時間 220 ms / 2,000 ms
コード長 350 bytes
コンパイル時間 3,357 ms
コンパイル使用メモリ 71,172 KB
実行使用メモリ 59,748 KB
最終ジャッジ日時 2023-08-16 19:15:31
合計ジャッジ時間 4,583 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 107 ms
56,192 KB
testcase_01 AC 109 ms
56,020 KB
testcase_02 AC 106 ms
55,744 KB
testcase_03 AC 113 ms
55,796 KB
testcase_04 AC 215 ms
59,748 KB
testcase_05 AC 173 ms
58,536 KB
testcase_06 AC 202 ms
58,936 KB
testcase_07 AC 220 ms
59,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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