結果

問題 No.369 足し間違い
ユーザー nCk_cvnCk_cv
提出日時 2016-07-01 18:25:53
言語 Java21
(openjdk 21)
結果
AC  
実行時間 218 ms / 2,000 ms
コード長 508 bytes
コンパイル時間 1,829 ms
コンパイル使用メモリ 74,420 KB
実行使用メモリ 58,188 KB
最終ジャッジ日時 2024-04-20 05:03:48
合計ジャッジ時間 3,664 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
54,228 KB
testcase_01 AC 113 ms
53,968 KB
testcase_02 AC 117 ms
54,252 KB
testcase_03 AC 106 ms
52,876 KB
testcase_04 AC 211 ms
57,728 KB
testcase_05 AC 164 ms
56,860 KB
testcase_06 AC 208 ms
58,188 KB
testcase_07 AC 218 ms
57,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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


public class Main {
	static int[] vy = {1,0,-1,0};
	static int[] vx = {0,1,0,-1};
	public static void main(String[] args) {	
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int N = sc.nextInt();
		int[] A = new int[N];
		for(int i = 0; i < N; i++) {
			A[i] = sc.nextInt();
		}
		int v = sc.nextInt();
		int sum = 0;
		for(int i = 0; i < N; i++) {
			sum += A[i];
		}
		System.out.println((sum - v));
	}
}
0