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)
相关文章推荐
- 166. Fraction to Recurring Decimal
- 【LeetCode】Fraction to Recurring Decimal【Solution】
- leetcode Fraction to Recurring Decimal 哈希表
- Fraction to Recurring Decimal
- leetcode166. Fraction to Recurring Decimal
- LeetCode 166. Fraction to Recurring Decimal
- convert decimal to binary
- [LeetCode] Fraction to Recurring Decimal
- LeetCode:Fraction to Recurring Decimal
- 【leetcode】Fraction to Recurring Decimal
- [leetcode] Fraction to Recurring Decimal
- leetcode(166) Fraction to Recurring Decimal
- [leetcode] Fraction to Recurring Decimal
- [LeetCode]Fraction to Recurring Decimal
- leetcode[166] Fraction to Recurring Decimal
- leetcode:Fraction to Recurring Decimal
- Fraction to recurring decimal
- 将十进制转换成二进制 Convert decimal to binary
- Fraction to Recurring Decimal
- LeetCode---166. Fraction to Recurring Decimal