You have a fraction a/b. You need to find the first occurrence of digit c into decimal notation of the fraction after decimal point.
You have a fraction a/b. You need to find the first occurrence of digit c into decimal notation of the fraction after decimal point.
The first contains three single positive integers a, b, c (1 <= a < b <= 10^5, 0 <= c <=9).
Print position of the first occurrence of digit c into the fraction. Positions are numbered from 1 after decimal point. It there is no such position, print -1.
1 2 0
2 3 7
2
-1
Anything about this OnlineJudge, Please Contact Administrator. Click add QQ
OJ system based on HUSTOJ Project , UI based on Twitter Bootstrap
Copyright 2016 ACM算法攻关部cnt: 11947
关于网站改版