問題一覧 > 通常問題

No.2417 Div Count

レベル : / AI推定難易度 : 550 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 176
作問者 : dyktr_06 / テスター : Nafmo2 LaFolia13 hikikomori sepa38 Seed57_cash Udon ryota2357
お気に入りにしたユーザー ProblemId : 9700 / 自分の提出
問題文最終更新日: 2023-08-12 13:31:30
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
MMA Contest 016 (順位表) の他の問題:

Problem Statement

You are given a positive integer $N$ and a non-negative integer $K$.

Find the number of positive integers $A$ such that the remainder when $N$ is divided by $A$ is $K$.


Constraints

  • $1 \leq N \leq 10^{12}$
  • $0 \leq K < N$
  • All input values are integers.

Input

The input is given from Standard Input in the following format.

$N$ $K$  

Output

Print the answer on a single line.

Sample

Sample 1
Input
38 3
Output
3

When $A = 5, 7, 35$, the remainder when $38$ is divided by $A$ is $3$.

Sample

Sample 2
Input
2357 0
Output
2

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。