Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 240 Accepted Submission(s): 56
Problem Description
Given a number n, and a geometric progression a
i = b * q^i, i ≥ 0, what is the fraction of the elements of that progression with decimal notation that has the decimal notation of n as prefix ?
More formally, if c
i out of the first i elements of the progression start with n in decimal notation, you need to find the limit