Author: | A. Klenin | Time limit: | 1 sec | |
Input file: | input.txt | Memory limit: | 64 Mb | |
Output file: | output.txt |
Floating point numbers can be presented by a computer program in various formats, either exponential or fixed. For example, a number 1234.5 can be presented as "1234.5", "123.45e1", "0.12345e4", "12345e-1" and so on.
You program must find the shortest possible representation of a given floating point number. Representation is allowed to omit both leading and trailing zeros, but must preserve all the other digits.
Input number contains from 1 to 1000 digits and is either 0 or in range from 10 − 2000 to 102000.
Both input and output numbers must contain at least one digit on each side of the decimal point (if the point is present) and must denote exponent with the lowercase letter 'e'.
No. | Input file (input.txt ) |
Output file (output.txt ) |
---|---|---|
1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|