Codeforces Round 160 (Div. 1)
翻译中…
Maxim has got a calculator. The calculator has two integer cells. Initially, the first cell contains number $1$, and the second cell contains number $0$. In one move you can perform one of the following operations:
翻译中…
- Let's assume that at the current time the first cell contains number
$*a*$, and the second cell contains number$*b*$. Write to the second cell number$*b* + 1$; - Let's assume that at the current time the first cell contains number
$*a*$, and the second cell contains number$*b*$. Write to the first cell number$*a*·*b*$.
翻译中…
Maxim is wondering, how many integers $*x*$ $(*l* ≤ *x* ≤ *r*)$ are there, such that we can write the number $*x*$ to the first cell of the calculator, having performed at most $*p*$ moves.
翻译中…
Input
翻译中…
The first line contains three integers: $*l*$, $*r*$, $*p*$ $(2 ≤ *l* ≤ *r* ≤ 10^{9}, 1 ≤ *p* ≤ 100)$.
翻译中…
The numbers in the line are separated by single spaces.
翻译中…
Output
翻译中…
In a single line print a single integer — the answer to the problem.
翻译中…
样例
Input #1
2 10 3
Output #1
1
InputCopy
OutputCopy
Input #2
2 111 100
Output #2
106
InputCopy
OutputCopy
Input #3
2 111 11
Output #3
47
InputCopy
OutputCopy
题目信息
标签
暴力
动态规划
双指针
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。