#B2073. Find the n-th Digit After the Decimal Point

    ID: 11155 Type: Default 1000ms 256MiB

Find the n-th Digit After the Decimal Point

Find the n-th Digit After the Decimal Point

Given a fraction \(\frac{a}{b}\) expressed in decimal form, determine the digit in the n-th position after the decimal point. For example, for \(\frac{1}{8} = 0.125\), the first digit after the decimal point is 1.

Note: The position after the decimal point is 1-indexed.

inputFormat

The input consists of three numbers: a, b and n, where \(\frac{a}{b}\) is the fraction and n is the position after the decimal point whose digit is to be found. All values are given in a single line separated by spaces.

Constraints can be assumed such that the computation can be performed with standard 64-bit integer arithmetic.

outputFormat

Output a single integer representing the n-th digit after the decimal point of the fraction \(\frac{a}{b}\).

sample

1 8 1
1