This page is still under construction.

Parts of this page are still being built. What you see may change.

Divisors of a Binomial Coefficient

Time limit1sMemory limit256 MB

Summary
For each pair n and k, count the distinct divisors of the binomial coefficient C(n, k), where n is at most 431.
Level

Medium7 of 10

Topics
Number theory, Math, Combinatorics, Dynamic programming
Solved
No attempts yet

Problem

Given two integers nn and kk, determine the number of distinct divisors of the binomial coefficient (nk)\binom{n}{k}.

Input

The input consists of several test cases. Each test case is a single line containing two integers nn and kk (0≤k≤n≤4310 \le k \le n \le 431), separated by a single space. Input continues until end of file (EOF).

Output

For each test case, output a single line containing one integer — the number of distinct divisors of (nk)\binom{n}{k}. For the given inputs, this value does not exceed 263−12^{63}-1.

Examples1

  1. Example 1

    Input
    5 1
    6 3
    10 4
    
    Expected output
    2
    6
    16