結果

問題 No.2417 Div Count
ユーザー hotate29
提出日時 2023-08-12 13:47:49
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 340 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-11-19 16:12:57
合計ジャッジ時間 3,155 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2
other WA * 41
権限があれば一括ダウンロードができます

ソースコード

diff #

def divisors(n: int):
    upper = []
    lower = []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower.append(i)
            if i != n // i:
                upper.append(n // i)
        i += 1
    return lower + upper[::-1]


n, k = map(int, input().split())
x = n - k
d = divisors(x)
ans = len(d) - k == 0
print(ans)
0