結果

問題 No.1250 汝は倍数なりや?
ユーザー nasubi24nasubi24
提出日時 2020-10-09 21:24:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 249 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 28,516 KB
最終ジャッジ日時 2023-09-27 14:11:56
合計ジャッジ時間 4,021 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
7,800 KB
testcase_01 AC 12 ms
7,872 KB
testcase_02 AC 13 ms
7,844 KB
testcase_03 AC 13 ms
7,908 KB
testcase_04 AC 12 ms
7,804 KB
testcase_05 AC 12 ms
7,876 KB
testcase_06 AC 13 ms
7,844 KB
testcase_07 AC 13 ms
7,796 KB
testcase_08 AC 13 ms
7,816 KB
testcase_09 AC 13 ms
7,820 KB
testcase_10 AC 13 ms
7,804 KB
testcase_11 AC 12 ms
7,796 KB
testcase_12 AC 13 ms
7,800 KB
testcase_13 AC 12 ms
7,784 KB
testcase_14 AC 13 ms
7,796 KB
testcase_15 AC 12 ms
7,800 KB
testcase_16 AC 13 ms
7,848 KB
testcase_17 AC 12 ms
7,908 KB
testcase_18 AC 13 ms
7,800 KB
testcase_19 AC 13 ms
7,840 KB
testcase_20 AC 12 ms
7,800 KB
testcase_21 AC 12 ms
7,784 KB
testcase_22 AC 13 ms
7,724 KB
testcase_23 AC 12 ms
7,948 KB
testcase_24 AC 13 ms
7,812 KB
testcase_25 AC 13 ms
7,724 KB
testcase_26 AC 13 ms
7,840 KB
testcase_27 AC 12 ms
7,816 KB
testcase_28 AC 13 ms
7,816 KB
testcase_29 AC 12 ms
7,844 KB
testcase_30 AC 13 ms
7,972 KB
testcase_31 AC 12 ms
7,952 KB
testcase_32 AC 14 ms
7,784 KB
testcase_33 AC 124 ms
28,516 KB
testcase_34 AC 39 ms
18,272 KB
testcase_35 AC 62 ms
25,920 KB
testcase_36 AC 110 ms
26,796 KB
testcase_37 AC 74 ms
19,332 KB
testcase_38 AC 80 ms
20,184 KB
testcase_39 AC 41 ms
18,484 KB
testcase_40 AC 41 ms
18,688 KB
testcase_41 AC 86 ms
21,788 KB
testcase_42 AC 53 ms
15,464 KB
testcase_43 AC 111 ms
26,780 KB
testcase_44 AC 53 ms
15,588 KB
testcase_45 AC 78 ms
26,804 KB
testcase_46 AC 42 ms
13,460 KB
testcase_47 AC 49 ms
19,544 KB
testcase_48 AC 13 ms
7,880 KB
testcase_49 AC 13 ms
7,724 KB
testcase_50 AC 13 ms
7,844 KB
testcase_51 AC 13 ms
7,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,h=map(int,input().split())
a=list(map(int,input().split()))
cnt=a[0]%h
if cnt==0:
    ans=1
else:
    ans=0
for i in range(1,n):
    cnt*=a[i]
    cnt%=h
    if cnt==0:
        ans=1
        break
if ans==1:
    print("YES")
else:
    print("NO")
0