結果

問題 No.369 足し間違い
ユーザー t8m8⛄️t8m8⛄️
提出日時 2016-08-17 15:14:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 755 bytes
コンパイル時間 4,722 ms
コンパイル使用メモリ 79,240 KB
実行使用メモリ 47,312 KB
最終ジャッジ日時 2024-04-25 08:21:51
合計ジャッジ時間 6,727 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,196 KB
testcase_01 AC 127 ms
41,360 KB
testcase_02 AC 118 ms
40,172 KB
testcase_03 AC 140 ms
41,708 KB
testcase_04 AC 244 ms
47,312 KB
testcase_05 AC 193 ms
43,276 KB
testcase_06 AC 245 ms
46,188 KB
testcase_07 AC 257 ms
46,776 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