結果

問題 No.369 足し間違い
ユーザー sougo002
提出日時 2016-06-30 22:57:04
言語 Java
(openjdk 23)
結果
AC  
実行時間 263 ms / 2,000 ms
コード長 422 bytes
コンパイル時間 3,463 ms
コンパイル使用メモリ 75,080 KB
実行使用メモリ 47,064 KB
最終ジャッジ日時 2024-10-11 23:56:01
合計ジャッジ時間 5,622 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

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