結果

問題 No.2682 Visible Divisible
ユーザー 👑 SPD_9X2SPD_9X2
提出日時 2023-12-16 13:50:35
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 113,532 KB
最終ジャッジ日時 2023-12-16 13:54:51
合計ジャッジ時間 20,091 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1,236 ms
113,188 KB
testcase_01 AC 1,229 ms
113,360 KB
testcase_02 AC 1,233 ms
113,436 KB
testcase_03 AC 1,231 ms
113,524 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1,232 ms
112,324 KB
testcase_08 AC 40 ms
54,100 KB
testcase_09 AC 40 ms
54,100 KB
testcase_10 AC 40 ms
54,100 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 1,231 ms
112,488 KB
testcase_14 WA -
testcase_15 AC 1,232 ms
112,296 KB
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

"""

WA解

凄く雑に

"""

import sys
import math
import random

LIM = 5000

n, k = map(int, input().split())
a = list(map(int,input().split()))
random.shuffle(a)

if len(a) >= LIM:
    a = a[:LIM]

x = 1
for v in a:
    x = x * v // math.gcd(x, v)
    if x % k == 0:
        print ("Yes")
        sys.exit()

print("No")
0