結果

問題 No.369 足し間違い
ユーザー FVRChanFVRChan
提出日時 2017-09-29 10:08:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 248 ms / 2,000 ms
コード長 293 bytes
コンパイル時間 2,065 ms
コンパイル使用メモリ 72,200 KB
実行使用メモリ 59,652 KB
最終ジャッジ日時 2023-08-09 21:51:35
合計ジャッジ時間 4,217 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,888 KB
testcase_01 AC 126 ms
55,888 KB
testcase_02 AC 123 ms
54,064 KB
testcase_03 AC 132 ms
55,716 KB
testcase_04 AC 234 ms
59,652 KB
testcase_05 AC 192 ms
57,812 KB
testcase_06 AC 233 ms
58,796 KB
testcase_07 AC 248 ms
59,508 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