PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000200. Số ước của hệ số tổ hợp (Divisors)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Số ước của hệ số tổ hợp (Divisors)

Số ước của hệ số tổ hợp (Divisors)

Source: Kattis

Version: Phuoc Hung OJ Extended

Problem Statement

Given integers n,kn,k, compute the exact number of distinct positive divisors of the binomial coefficient (nk)=n!k!(n−k)!\binom nk=\frac{n!}{k!(n-k)!}. The result fits in a signed 64-bit integer; do not take a modulus.

Input

One line with n,kn,k.

Output

Print the exact count of distinct positive divisors of (nk)\binom nk.

Subtasks

  • Subtask 1 (20 points): 0≤k≤n≤600\le k\le n\le 60.

  • Subtask 2 (30 points): 0≤k≤n≤2500\le k\le n\le 250.

  • Subtask 3 (50 points): 0≤k≤n≤4310\le k\le n\le 431.

Examples

Example 1

Input

5 1

Output

2

Explanation

The binomial coefficient (51)=5\binom51=5 has two positive divisors.

Example 2

Input

6 3

Output

6

Explanation

The coefficient (63)=20=22⋅5\binom63=20=2^2\cdot5 has (2+1)(1+1)=6(2+1)(1+1)=6 positive divisors.

Example 3

Input

10 4

Output

16

Explanation

The coefficient (104)=210=2⋅3⋅5⋅7\binom{10}{4}=210=2\cdot3\cdot5\cdot7 has sixteen positive divisors.