結果

問題 No.369 足し間違い
ユーザー sougo002sougo002
提出日時 2016-06-30 22:57:04
言語 Java21
(openjdk 21)
結果
AC  
実行時間 239 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 2,869 ms
コンパイル使用メモリ 73,976 KB
実行使用メモリ 58,176 KB
最終ジャッジ日時 2024-04-20 04:57:31
合計ジャッジ時間 4,730 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 115 ms
54,016 KB
testcase_01 AC 104 ms
53,076 KB
testcase_02 AC 107 ms
52,948 KB
testcase_03 AC 114 ms
53,128 KB
testcase_04 AC 233 ms
58,176 KB
testcase_05 AC 171 ms
56,772 KB
testcase_06 AC 239 ms
57,348 KB
testcase_07 AC 232 ms
58,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class TGMain {
    
    public static void main(String[] args){
        int a, b, c;
        int v;
        int ans = 0;
        Scanner sc = new Scanner(System.in);
        int[] all = new int[sc.nextInt()];
        for(int i = 0; i < all.length; i++){
            ans += sc.nextInt();
            
        }
        v = sc.nextInt();
        System.out.println(ans - v);
        
    }
}
0