結果
| 問題 | No.1250 汝は倍数なりや? |
| コンテスト | |
| ユーザー |
godcity
|
| 提出日時 | 2020-10-25 07:35:20 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 234 ms / 1,000 ms |
| コード長 | 314 bytes |
| 記録 | |
| コンパイル時間 | 528 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 34,696 KB |
| 最終ジャッジ日時 | 2026-04-03 05:23:51 |
| 合計ジャッジ時間 | 10,165 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 49 |
ソースコード
# https://yukicoder.me/problems/no/1250
import sys
n, h = list(map(int, input().split()))
a = list(map(int, input().split()))
if ((0 in a) or (h in a)):
print("YES")
sys.exit()
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")
godcity