結果

問題 No.369 足し間違い
ユーザー GoyotanGoyotan
提出日時 2016-07-18 16:32:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 189 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 3,640 ms
コンパイル使用メモリ 75,208 KB
実行使用メモリ 57,200 KB
最終ジャッジ日時 2024-04-23 16:29:54
合計ジャッジ時間 4,618 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
54,180 KB
testcase_01 AC 120 ms
54,228 KB
testcase_02 AC 105 ms
52,916 KB
testcase_03 AC 123 ms
54,288 KB
testcase_04 AC 180 ms
55,340 KB
testcase_05 AC 142 ms
53,392 KB
testcase_06 AC 177 ms
55,280 KB
testcase_07 AC 189 ms
57,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Study03 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String a = sc.nextLine();
		int first = Integer.parseInt(a);

		String sss = sc.nextLine();
		String [] q = sss.split(" ");
		
		int num = 0;
		int[] sds = new int[q.length];
		for(int i=0;i<q.length;i++){
			sds[i] = Integer.parseInt(q[i]);
			num += sds[i];
			
		}

		int last = sc.nextInt();
		
		System.out.println(num-last);

	}

}
0