結果

問題 No.369 足し間違い
ユーザー takeya_okinotakeya_okino
提出日時 2017-06-19 22:14:02
言語 Java21
(openjdk 21)
結果
AC  
実行時間 266 ms / 2,000 ms
コード長 302 bytes
コンパイル時間 2,020 ms
コンパイル使用メモリ 74,496 KB
実行使用メモリ 57,920 KB
最終ジャッジ日時 2024-04-10 06:15:12
合計ジャッジ時間 4,303 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
53,884 KB
testcase_01 AC 129 ms
54,252 KB
testcase_02 AC 129 ms
53,912 KB
testcase_03 AC 135 ms
54,068 KB
testcase_04 AC 250 ms
57,772 KB
testcase_05 AC 187 ms
54,540 KB
testcase_06 AC 246 ms
57,700 KB
testcase_07 AC 266 ms
57,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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