結果

問題 No.369 足し間違い
ユーザー sougo002sougo002
提出日時 2016-06-30 22:57:04
言語 Java19
(openjdk 21)
結果
AC  
実行時間 243 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 3,157 ms
コンパイル使用メモリ 72,792 KB
実行使用メモリ 59,940 KB
最終ジャッジ日時 2023-08-02 04:52:32
合計ジャッジ時間 5,184 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
55,908 KB
testcase_01 AC 122 ms
55,876 KB
testcase_02 AC 120 ms
55,544 KB
testcase_03 AC 126 ms
56,008 KB
testcase_04 AC 233 ms
59,564 KB
testcase_05 AC 184 ms
58,324 KB
testcase_06 AC 227 ms
59,056 KB
testcase_07 AC 243 ms
59,940 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