結果

問題 No.369 足し間違い
ユーザー pippicaopippicao
提出日時 2016-06-27 22:16:25
言語 Java21
(openjdk 21)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 609 bytes
コンパイル時間 3,544 ms
コンパイル使用メモリ 73,124 KB
実行使用メモリ 39,332 KB
最終ジャッジ日時 2024-04-20 03:33:49
合計ジャッジ時間 4,255 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 49 ms
36,604 KB
testcase_01 AC 50 ms
36,848 KB
testcase_02 AC 50 ms
36,992 KB
testcase_03 AC 52 ms
36,740 KB
testcase_04 AC 90 ms
39,188 KB
testcase_05 AC 54 ms
36,940 KB
testcase_06 AC 88 ms
39,332 KB
testcase_07 AC 95 ms
39,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package yukicoder;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class No369TashiMachigai {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int times = Integer.parseInt(br.readLine());
        String[] nums = br.readLine().split(" ");
        
        int num = 0;
        for(int i = 0; i < nums.length; i++) {
            num += Integer.parseInt(nums[i]);
        }
        
        int ans = num - Integer.parseInt(br.readLine());
        System.out.println(ans);
    }

}
0