Digits

AtCoder
IDabc156_b
Time2000ms
Memory256MB
Difficulty
Given is an integer $N$. Find the number of digits that $N$ has in base $K$. ## 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$ [samples] ## Notes For information on base-$K$ representation, see [Positional notation - Wikipedia](https://en.wikipedia.org/wiki/Positional_notation).
Samples
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
API Response (JSON)
{
  "problem": {
    "name": "Digits",
    "description": {
      "content": "Given is an integer $N$. Find the number of digits that $N$ has in base $K$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc156_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Given is an integer $N$. Find the number of digits that $N$ has in base $K$.\n\n## Constraints\n\n*   All values in input are integers.\n*   $1 \\leq N \\leq 10^9$\n*   $2 \\leq K \\leq 10$\n\n## Input\n\nInput is ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments