BETA

Difficulty Level:

Easy

Total Submissions: 165 Accuracy:

31.52%

First K Digits
     

Given a positive integer n, print first k digits after point in value of 1/n.

Your program should avoid overflow and floating point arithmetic.

Input:

First line of input contains the number of test cases.

The only line of each test case contains 2 spaced integers n and k.
 

Output:

Output the first k digits.

Constraints:
1<=T<=100

1<=N<=10000

1<=K<=10000

Example:

Sample Input:

2
3 3
50 4

Sample Output:

333
0200

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: jain_rishabh

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.