結果

問題 No.369 足し間違い
ユーザー yrindayrinda
提出日時 2016-05-20 11:41:31
言語 Java21
(openjdk 21)
結果
AC  
実行時間 260 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 2,045 ms
コンパイル使用メモリ 74,812 KB
実行使用メモリ 47,124 KB
最終ジャッジ日時 2024-04-16 01:45:21
合計ジャッジ時間 4,015 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
41,424 KB
testcase_01 AC 114 ms
40,232 KB
testcase_02 AC 127 ms
41,344 KB
testcase_03 AC 131 ms
41,620 KB
testcase_04 AC 249 ms
47,124 KB
testcase_05 AC 192 ms
42,752 KB
testcase_06 AC 240 ms
45,756 KB
testcase_07 AC 260 ms
46,468 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