結果
| 問題 |
No.1250 汝は倍数なりや?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-15 01:53:58 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 142 ms / 1,000 ms |
| コード長 | 196 bytes |
| コンパイル時間 | 217 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 107,864 KB |
| 最終ジャッジ日時 | 2024-11-30 11:34:18 |
| 合計ジャッジ時間 | 5,599 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 49 |
ソースコード
import math
N, H = map(int, input().split())
A = list(map(int, input().split()))
G = 1
for a in A:
G *= math.gcd(a, H)
G %= H
if G%H==0:
print("YES")
exit()
print("NO")