結果

問題 No.2682 Visible Divisible
ユーザー flygonflygon
提出日時 2024-03-20 21:22:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 257 ms / 2,000 ms
コード長 418 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 114,120 KB
最終ジャッジ日時 2024-03-20 21:22:58
合計ジャッジ時間 4,864 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 229 ms
113,472 KB
testcase_01 AC 230 ms
113,960 KB
testcase_02 AC 236 ms
114,032 KB
testcase_03 AC 229 ms
113,996 KB
testcase_04 AC 133 ms
106,708 KB
testcase_05 AC 177 ms
113,492 KB
testcase_06 AC 199 ms
114,120 KB
testcase_07 AC 257 ms
112,648 KB
testcase_08 AC 46 ms
55,720 KB
testcase_09 AC 51 ms
55,720 KB
testcase_10 AC 44 ms
55,720 KB
testcase_11 AC 223 ms
113,476 KB
testcase_12 AC 234 ms
113,872 KB
testcase_13 AC 217 ms
113,332 KB
testcase_14 AC 202 ms
113,884 KB
testcase_15 AC 237 ms
113,252 KB
testcase_16 AC 146 ms
106,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(5*10**5)
input = sys.stdin.readline
from collections import defaultdict, deque, Counter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right
from math import gcd

n,k = map(int,input().split())
a = list(map(int,input().split()))
now = 1
for i in range(n):
    now = now*a[i]//gcd(now, a[i])
    now %= k

if now  == 0:
    print('Yes')
else:
    print('No')
0