結果
| 問題 |
No.2417 Div Count
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-08-12 13:43:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 407 bytes |
| コンパイル時間 | 159 ms |
| コンパイル使用メモリ | 82,428 KB |
| 実行使用メモリ | 58,880 KB |
| 最終ジャッジ日時 | 2024-11-19 16:01:11 |
| 合計ジャッジ時間 | 3,069 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 41 |
ソースコード
def make_divisors(n):
lower_divisors , upper_divisors = [], []
i = 1
while i*i <= n:
if n % i == 0:
lower_divisors.append(i)
if i != n // i:
upper_divisors.append(n//i)
i += 1
return lower_divisors + upper_divisors[::-1]
N, K = map(int, input().split())
Y = make_divisors(N-K)
cnt = 0
for y in Y:
if y>K:
cnt+=1
print(cnt)