結果

問題 No.369 足し間違い
ユーザー FVRChanFVRChan
提出日時 2017-09-29 10:08:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 237 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 1,819 ms
コンパイル使用メモリ 74,176 KB
実行使用メモリ 58,044 KB
最終ジャッジ日時 2024-04-27 16:13:21
合計ジャッジ時間 3,816 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
53,936 KB
testcase_01 AC 105 ms
52,836 KB
testcase_02 AC 114 ms
53,824 KB
testcase_03 AC 109 ms
52,584 KB
testcase_04 AC 220 ms
57,596 KB
testcase_05 AC 169 ms
54,244 KB
testcase_06 AC 215 ms
58,044 KB
testcase_07 AC 237 ms
57,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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