結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
57,396 KB
testcase_01 AC 129 ms
57,428 KB
testcase_02 AC 134 ms
57,620 KB
testcase_03 AC 135 ms
57,492 KB
testcase_04 AC 133 ms
57,448 KB
testcase_05 AC 132 ms
57,492 KB
testcase_06 AC 132 ms
57,452 KB
testcase_07 AC 133 ms
57,404 KB
testcase_08 AC 134 ms
57,672 KB
testcase_09 AC 136 ms
57,636 KB
testcase_10 AC 132 ms
57,452 KB
testcase_11 AC 135 ms
57,668 KB
testcase_12 AC 133 ms
57,460 KB
testcase_13 AC 132 ms
57,516 KB
testcase_14 AC 135 ms
57,596 KB
testcase_15 AC 133 ms
57,624 KB
testcase_16 AC 135 ms
57,524 KB
testcase_17 AC 134 ms
57,708 KB
testcase_18 AC 135 ms
57,176 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();
		int M = sc.nextInt();
		//目標値
		int S = sc.nextInt();
		int 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