結果

問題 No.369 足し間違い
ユーザー atkrymatkrym
提出日時 2016-10-22 18:03:50
言語 Java
(openjdk 23)
結果
AC  
実行時間 282 ms / 2,000 ms
コード長 374 bytes
コンパイル時間 2,431 ms
コンパイル使用メモリ 74,492 KB
実行使用メモリ 47,148 KB
最終ジャッジ日時 2024-11-23 17:16:25
合計ジャッジ時間 4,483 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.math.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        int n = sc.nextInt();
        int ret = 0;
        for (int i = 0;i < n;i++) {
            ret += sc.nextInt();
        }
        
        System.out.println(ret - sc.nextInt());
    }
}
0