結果

問題 No.1250 汝は倍数なりや?
ユーザー xRS43BofaUEZ5gcxRS43BofaUEZ5gc
提出日時 2021-03-11 09:06:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 805 ms / 1,000 ms
コード長 391 bytes
コンパイル時間 3,554 ms
コンパイル使用メモリ 74,584 KB
実行使用メモリ 56,256 KB
最終ジャッジ日時 2024-04-21 01:04:27
合計ジャッジ時間 20,665 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
40,056 KB
testcase_01 AC 117 ms
40,844 KB
testcase_02 AC 126 ms
41,396 KB
testcase_03 AC 112 ms
40,068 KB
testcase_04 AC 126 ms
41,308 KB
testcase_05 AC 124 ms
41,404 KB
testcase_06 AC 119 ms
40,876 KB
testcase_07 AC 114 ms
39,884 KB
testcase_08 AC 132 ms
41,540 KB
testcase_09 AC 129 ms
41,512 KB
testcase_10 AC 125 ms
40,980 KB
testcase_11 AC 113 ms
39,900 KB
testcase_12 AC 112 ms
39,980 KB
testcase_13 AC 135 ms
41,616 KB
testcase_14 AC 136 ms
41,172 KB
testcase_15 AC 144 ms
41,408 KB
testcase_16 AC 137 ms
41,760 KB
testcase_17 AC 122 ms
40,632 KB
testcase_18 AC 135 ms
41,408 KB
testcase_19 AC 127 ms
41,176 KB
testcase_20 AC 141 ms
41,252 KB
testcase_21 AC 124 ms
41,380 KB
testcase_22 AC 139 ms
41,408 KB
testcase_23 AC 178 ms
42,156 KB
testcase_24 AC 177 ms
41,996 KB
testcase_25 AC 183 ms
42,424 KB
testcase_26 AC 165 ms
41,736 KB
testcase_27 AC 184 ms
42,556 KB
testcase_28 AC 168 ms
42,332 KB
testcase_29 AC 165 ms
41,680 KB
testcase_30 AC 177 ms
42,344 KB
testcase_31 AC 164 ms
42,096 KB
testcase_32 AC 168 ms
42,268 KB
testcase_33 AC 786 ms
56,256 KB
testcase_34 AC 609 ms
47,988 KB
testcase_35 AC 669 ms
52,592 KB
testcase_36 AC 805 ms
52,620 KB
testcase_37 AC 639 ms
48,332 KB
testcase_38 AC 655 ms
48,940 KB
testcase_39 AC 609 ms
47,936 KB
testcase_40 AC 618 ms
48,424 KB
testcase_41 AC 606 ms
50,920 KB
testcase_42 AC 573 ms
47,888 KB
testcase_43 AC 754 ms
52,632 KB
testcase_44 AC 607 ms
48,136 KB
testcase_45 AC 777 ms
52,556 KB
testcase_46 AC 497 ms
48,092 KB
testcase_47 AC 646 ms
48,916 KB
testcase_48 AC 133 ms
41,496 KB
testcase_49 AC 126 ms
41,260 KB
testcase_50 AC 126 ms
41,140 KB
testcase_51 AC 118 ms
40,512 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class HelloWorld {

	    public static void main(String[] args) throws Exception {

	    	Scanner sc = new Scanner(System.in);
	    	long n = sc.nextLong();
	    	long h = sc.nextLong();
	    	long ans = 1;
	    	for (int i = 0; i < n; i ++) {
	    		ans = ans * sc.nextLong() % h;
	    	}

	    	System.out.println(ans == 0? "YES" : "NO");
	    	}

	    }
0