結果

問題 No.1250 汝は倍数なりや?
ユーザー ak0327ak0327
提出日時 2020-10-10 11:37:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 563 bytes
コンパイル時間 101 ms
コンパイル使用メモリ 10,924 KB
実行使用メモリ 28,624 KB
最終ジャッジ日時 2023-09-27 21:19:13
合計ジャッジ時間 4,054 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
9,808 KB
testcase_01 AC 19 ms
9,500 KB
testcase_02 AC 18 ms
9,756 KB
testcase_03 AC 18 ms
9,788 KB
testcase_04 WA -
testcase_05 AC 18 ms
9,856 KB
testcase_06 AC 17 ms
9,732 KB
testcase_07 AC 18 ms
9,788 KB
testcase_08 AC 18 ms
9,812 KB
testcase_09 AC 17 ms
9,864 KB
testcase_10 AC 18 ms
9,852 KB
testcase_11 WA -
testcase_12 AC 17 ms
9,864 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 18 ms
9,728 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 18 ms
9,748 KB
testcase_24 AC 18 ms
9,868 KB
testcase_25 AC 18 ms
9,836 KB
testcase_26 WA -
testcase_27 AC 19 ms
9,808 KB
testcase_28 WA -
testcase_29 AC 18 ms
9,928 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 RE -
testcase_46 RE -
testcase_47 RE -
testcase_48 WA -
testcase_49 RE -
testcase_50 WA -
testcase_51 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

    return return_list


n, h = map(int, input().split())
al = list(map(int, input().split()))
div = make_divisors(n)

cnt = [0]*(2*10**5+1)
for a in al:
    cnt[a] += 1

ans = 'NO'
if len(div) > 2:
    for i in range(0, len(div), 2):
        if cnt[i] > 0 and cnt[i+1] > 0:
            ans = 'YES'
if cnt[n] > 0:
    ans = 'YES'

print(ans)
0