题目描述
Problem Description
We know that when performing integer division, sometimes we get a finite decimal, and other times we get an infinite repeating decimal.
If we append an infinite number of zeros to the end of a finite decimal, they all take on a uniform form.
The task of this problem is, under the above convention, to find the three digits starting from the nth digit after the decimal point in the result of integer division.
Input Format
A single line containing three integers: $a$, $b$, and $n$, separated by spaces. $a$ is the dividend, $b$ is the divisor, and $n$ is the position after the decimal point from which to start counting (with $0 < a, b, n < 10^9$).
Output Format
A single line containing three digits, representing the three digits starting from the nth digit after the decimal point in the result of $a$ divided by $b$.
Sample Input and Output
Sample Input #1
1 8 1
Sample Output #1
125
Sample Input #2
1 8 3
Sample Output #2
500
Sample Input #3
282866 999000 6
Sample Output #3
914
Notes
Time limit: 1 second, Memory limit: 256MB. This problem is from the 8th LanQiao Cup National Finals in 2017.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分