How many digits? X08783


Statement
 

pdf   zip

html

Write a program that computes the number of digits in several bases.

Input

Input consists of a sequence of pairs of natural numbers b and n, such that b≥ 2 and n≥ 1.

Output

For every pair, print the number of digits of n in base b.

Public test cases
  • Input

    2 8
    2 9
    2 15
    2 16
    3 6
    10 1
    10 10
    10 100
    10 1000
    

    Output

    4
    4
    4
    5
    2
    1
    2
    3
    4
    
  • Information
    Author
    Maria Serna
    Language
    English
    Translator
    Maria Serna
    Original language
    Catalan
    Other languages
    Catalan Spanish
    Official solutions
    Unknown. This problem is being checked.
    User solutions
    C C++