結果
| 問題 |
No.1250 汝は倍数なりや?
|
| コンテスト | |
| ユーザー |
godcity
|
| 提出日時 | 2020-10-25 07:35:20 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 173 ms / 1,000 ms |
| コード長 | 314 bytes |
| コンパイル時間 | 260 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 31,280 KB |
| 最終ジャッジ日時 | 2024-07-21 16:58:14 |
| 合計ジャッジ時間 | 4,835 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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