結果

問題 No.1250 汝は倍数なりや?
ユーザー ssmkzkssmkzk
提出日時 2020-10-29 03:15:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 581 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 10,848 KB
実行使用メモリ 32,880 KB
最終ジャッジ日時 2023-09-29 03:55:01
合計ジャッジ時間 4,296 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
12,224 KB
testcase_01 AC 16 ms
7,848 KB
testcase_02 AC 16 ms
7,808 KB
testcase_03 AC 16 ms
7,804 KB
testcase_04 AC 16 ms
7,944 KB
testcase_05 AC 17 ms
7,948 KB
testcase_06 AC 16 ms
7,848 KB
testcase_07 AC 16 ms
7,936 KB
testcase_08 AC 16 ms
7,820 KB
testcase_09 AC 16 ms
7,896 KB
testcase_10 AC 16 ms
7,868 KB
testcase_11 WA -
testcase_12 AC 17 ms
7,896 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 16 ms
7,936 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 16 ms
7,804 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 26 ms
8,904 KB
testcase_24 AC 26 ms
8,956 KB
testcase_25 AC 28 ms
8,864 KB
testcase_26 WA -
testcase_27 AC 27 ms
8,992 KB
testcase_28 WA -
testcase_29 AC 21 ms
8,680 KB
testcase_30 WA -
testcase_31 AC 21 ms
8,828 KB
testcase_32 WA -
testcase_33 TLE -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

divisors = []
def make_divisors(n):
    
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    return 0

N, H = map(int, input().split())
l_A = list(map(int, input().split()))

for li in l_A:
    make_divisors(abs(li))

divisors = set(divisors)
ans = []
for i in range(1, int(H**0.5)+1):
    if H % i == 0:
        ans.append(i)
        if i != H // i:
            ans.append(H//i)
if len(divisors) == len(set(list(divisors) + ans)):
    print("YES")
else:
    print("NO")
0