結果

問題 No.369 足し間違い
ユーザー yrindayrinda
提出日時 2016-05-20 11:41:31
言語 Java19
(openjdk 21)
結果
AC  
実行時間 236 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 1,947 ms
コンパイル使用メモリ 70,848 KB
実行使用メモリ 59,200 KB
最終ジャッジ日時 2023-07-28 17:40:07
合計ジャッジ時間 4,103 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,968 KB
testcase_01 AC 121 ms
55,960 KB
testcase_02 AC 122 ms
55,888 KB
testcase_03 AC 128 ms
55,708 KB
testcase_04 AC 235 ms
59,200 KB
testcase_05 AC 185 ms
58,852 KB
testcase_06 AC 226 ms
59,168 KB
testcase_07 AC 236 ms
59,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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