-->
当前位置:首页 > 题库

PROGRAMMING:Score position

Luz5年前 (2021-05-10)题库551
Recently, Xiao Ming is infatuated with a score game: for a given score $$\ frac {a} {B} $$, calculate the position where the number C (0   C   C   9) first appears after the decimal point in the decimal form of the score.
###Input format:
Input three positive integers a, B, C in one line (1  ≤  a  < B   B  ≤  10 $$^ {5} $$, 0  ≤  C   9).
###Output format:
Output the position where the number C first appears in the fraction. The position after the decimal point is numbered from 1. If it does not have such a position, output - 1.
###Input sample 1:
```in
1 2 0
```
###Output sample 1:
```out
two
```
###Input sample 2:
```in
2 3 7
```
###Output sample 2:
```out
-1
```
Tip: for the first example, 0 appears in the second place after the decimal point of the $$$frac {1} {2} $$decimal form. For the second example, $$frac {2} {3} $$has no 7 after the decimal point in decimal form.







answer:If there is no answer, please comment