Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

Problem hidden on 2014-11-11 01:30:38 by Francky

JIMMY - Lazy Jimmy

no tags 

Jim's lazy. Jim's bored. Jim hates repeating things. Lucky for him, we're his friends and we're gonna make him feel better. Oh wait, we're lazy too. We need you to help us find the repeating part of a decimal (If any) so we can take all the credit (Yeah, that's why it's the hardest problem).

Input

The first line consists of an integer T denoting the number of test cases.

This is followed by T lines consisting of two integers X and Y each.

1 <= T <= 15

0 <= X <= 10000000000

1 <= Y <= 10000000000

 

Output

 

a.b(c)

Where a.b(c) is the result of X/Y and c is the repeating set of digits.

Note: The output is case sensitive.

Example

Input:

2
1 3
1 2
2 12

Output:
0.(3)
Terminating
0.1(6)

hide comments
Francky: 2014-11-11 01:31:19

Problem hidden - see ROOT.

Min_25: 2014-11-03 23:44:11

The example is not correct; T should be 3.

The description is incomplete. (e.g. "Terminating")

And this problem seems to be broken
because my code (which got AC in ROOT) got WA here.

Last edit: 2014-11-04 01:01:32
[Trichromatic] XilinX: 2011-10-17 14:07:26

See problem ROOT.

!(NULL): 2011-10-15 23:04:38

My solution is correct. Why is it giving WA?
check first three submissions.

Last edit: 2011-10-15 23:20:06

Added by:Ali Asgar
Date:2011-10-14
Time limit:5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64