結果

問題 No.369 足し間違い
ユーザー fukuseifukusei
提出日時 2017-05-17 17:52:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 260 ms / 2,000 ms
コード長 310 bytes
コンパイル時間 3,322 ms
コンパイル使用メモリ 74,988 KB
実行使用メモリ 61,392 KB
最終ジャッジ日時 2023-10-17 23:58:53
合計ジャッジ時間 5,481 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
57,468 KB
testcase_01 AC 138 ms
57,400 KB
testcase_02 AC 134 ms
57,572 KB
testcase_03 AC 141 ms
57,692 KB
testcase_04 AC 257 ms
61,128 KB
testcase_05 AC 191 ms
59,628 KB
testcase_06 AC 252 ms
61,392 KB
testcase_07 AC 260 ms
61,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*; 

public class test {
 public static void main(String[] args){
  Scanner sc = new Scanner(System.in);
		
  int a = sc.nextInt();
  int b[] = new int[a];
  int sum = 0;

  for(int i=0; i<a; i++){
   sum += sc.nextInt();
  }

  int c = sc.nextInt();

  System.out.println(sum - c);
 }
}
 

		
0