結果

問題 No.369 足し間違い
ユーザー Hiroaki KonoHiroaki Kono
提出日時 2017-10-31 22:59:01
言語 Java21
(openjdk 21)
結果
AC  
実行時間 240 ms / 2,000 ms
コード長 331 bytes
コンパイル時間 3,247 ms
コンパイル使用メモリ 74,912 KB
実行使用メモリ 47,172 KB
最終ジャッジ日時 2024-05-02 01:49:07
合計ジャッジ時間 4,882 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
40,872 KB
testcase_01 AC 114 ms
41,196 KB
testcase_02 AC 113 ms
41,112 KB
testcase_03 AC 118 ms
41,016 KB
testcase_04 AC 223 ms
46,716 KB
testcase_05 AC 172 ms
42,992 KB
testcase_06 AC 226 ms
46,640 KB
testcase_07 AC 240 ms
47,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No369 {

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