您的位置:首页 > 其它

bjfu1011 Convert decimal to fraction

2016-08-16 12:51 218 查看

Convert decimal to fraction

时间限制(C/C++):1000MS/3000MS          运行内存限制:65536KByte

总提交:202            测试通过:47

描述

As we all know, every decimal can be converted to a fractional number.

So you please write a program to do this, not only ordinary decimal, but also circulating decimal, and remember that the result must be fraction in lowest term.


输入
The input consists of multiple test cases.

Each test case consis
4000
ts a Pure decimal (decimal without integer part), and the cyclic part should be enclosed buy brackets.And the length of each data would be less than 15 characters.

输出
For each test case, print each fraction in lowest term in a line.

样例输入
[code=plain;toolbar:false">0.25
0.(5)
0.32(692307)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: