結果

問題 No.1940 Escape through + -
ユーザー eagleeagle
提出日時 2022-05-28 11:22:40
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 487 bytes
コンパイル時間 2,052 ms
コンパイル使用メモリ 74,296 KB
実行使用メモリ 58,012 KB
最終ジャッジ日時 2023-10-20 22:48:55
合計ジャッジ時間 7,026 ms
ジャッジサーバーID
(参考情報)
judge11 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
57,440 KB
testcase_01 AC 126 ms
57,508 KB
testcase_02 AC 128 ms
57,368 KB
testcase_03 AC 124 ms
57,500 KB
testcase_04 AC 112 ms
56,096 KB
testcase_05 AC 114 ms
56,152 KB
testcase_06 AC 131 ms
57,220 KB
testcase_07 AC 128 ms
57,376 KB
testcase_08 AC 127 ms
57,396 KB
testcase_09 AC 126 ms
57,416 KB
testcase_10 AC 128 ms
57,464 KB
testcase_11 AC 131 ms
57,444 KB
testcase_12 AC 127 ms
57,248 KB
testcase_13 AC 127 ms
57,160 KB
testcase_14 AC 126 ms
57,336 KB
testcase_15 AC 118 ms
54,044 KB
testcase_16 AC 127 ms
57,576 KB
testcase_17 AC 129 ms
57,280 KB
testcase_18 AC 114 ms
56,096 KB
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc = new Scanner(System.in);
		//数列の長さ
		int N = sc.nextInt();
		long M = sc.nextInt();
		//目標値
		long S = sc.nextInt();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			sum += sc.nextInt();
		}
		String ans;
		if((S - sum) % M == 0) {
			ans = "Yes";
		} else {
			ans = "No";
		}
		System.out.println(ans);
	}
}
0