結果
| 問題 |
No.2417 Div Count
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2023-08-12 13:52:42 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 59 ms / 2,000 ms |
| コード長 | 330 bytes |
| コンパイル時間 | 176 ms |
| コンパイル使用メモリ | 82,112 KB |
| 実行使用メモリ | 59,824 KB |
| 最終ジャッジ日時 | 2024-11-19 16:27:09 |
| 合計ジャッジ時間 | 3,168 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 41 |
ソースコード
from sys import stdin
input=lambda :stdin.readline()[:-1]
def divisors(n):
lower,upper=[],[]
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())
ans=0
for d in divisors(n-k):
if n%d==k:
ans+=1
print(ans)
とりゐ