AtCoder Beginner Contest 156
B
Digits
AtCoder
⌀ 0
原题
← AC →
翻译中…

Problem Statement

翻译中…

Given is an integer $N$. Find the number of digits that $N$ has in base $K$.

翻译中…

Note

翻译中…

For information on base-$K$ representation, see Positional notation - Wikipedia.

翻译中…

Constraints

翻译中…
  • All values in input are integers.
  • $1 \leq N \leq 10^9$
  • $2 \leq K \leq 10$
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N K

翻译中…

Output

翻译中…

Print the number of digits that $N$ has in base $K$.

翻译中…

样例

Input #1
11 2
Output #1
4
In binary, $11$ is represented as `1011`.
Input #2
1010101 10
Output #2
7
Input #3
314159265 3
Output #3
18
题目信息
题号
abc156_b
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。