結果

問題 No.369 足し間違い
ユーザー TatsuDX
提出日時 2016-09-03 14:40:28
言語 Java
(openjdk 23)
結果
AC  
実行時間 274 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 3,475 ms
コンパイル使用メモリ 74,356 KB
実行使用メモリ 47,232 KB
最終ジャッジ日時 2024-11-15 18:39:26
合計ジャッジ時間 5,724 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt(), s = 0, r;
		for(int i = 0; i < n; i++){
		 s += sc.nextInt();
		}
		r = sc.nextInt();
		System.out.println(s-r);
	}
}
0