結果

問題 No.1250 汝は倍数なりや?
ユーザー godcity
提出日時 2020-10-25 07:33:03
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 148 ms / 1,000 ms
コード長 254 bytes
コンパイル時間 425 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 31,268 KB
最終ジャッジ日時 2024-07-21 16:58:08
合計ジャッジ時間 4,785 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 49
権限があれば一括ダウンロードができます

ソースコード

diff #

# https://yukicoder.me/problems/no/1250
import sys

n, h = list(map(int, input().split()))
a = list(map(int, input().split()))

ans = "NO"
q = a[0]
for i in range(1, n):
    q *= a[i]
    q %= h

if ((q % h) == 0):
    print("YES")
else:
    print("NO")
0