結果

問題 No.369 足し間違い
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-08-17 15:14:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 265 ms / 2,000 ms
コード長 755 bytes
コンパイル時間 4,385 ms
コンパイル使用メモリ 77,012 KB
実行使用メモリ 60,520 KB
最終ジャッジ日時 2023-08-07 14:38:20
合計ジャッジ時間 5,864 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
56,236 KB
testcase_01 AC 138 ms
56,356 KB
testcase_02 AC 138 ms
55,880 KB
testcase_03 AC 141 ms
56,264 KB
testcase_04 AC 257 ms
60,212 KB
testcase_05 AC 209 ms
59,204 KB
testcase_06 AC 255 ms
59,968 KB
testcase_07 AC 265 ms
60,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.io.*;
import java.awt.geom.*;
import java.math.*;

public class No0369 {

	static final Scanner in = new Scanner(System.in);
	static final PrintWriter out = new PrintWriter(System.out,false);
	static boolean debug = false;

	static void solve() {
		int n = in.nextInt();
		long sum = 0;
		for (int i=0; i<n; i++) {
			sum += in.nextInt();
		}
		int v = in.nextInt();
		out.println(sum - v);
	}

	public static void main(String[] args) {
		debug = args.length > 0;
		long start = System.nanoTime();

		solve();
		out.flush();

		long end = System.nanoTime();
		dump((end - start) / 1000000 + " ms");
		in.close();
		out.close();
	}

	static void dump(Object... o) { if (debug) System.err.println(Arrays.deepToString(o)); }
}
0