C. Exponential notation
time limit per test
2 seconds memory limit per test
256 megabytes input
standard input output
standard output You are given a positive decimal number x.
Your task is to convert it to the "simple exponential notation".
Let x = a·10b, where 1 ≤ a < 10, then in general case the "simple exponential notation" looks like "aEb". If b equals to zero, the part "Eb" should be skipped. If a is an integer, it should be written without decimal point. Also there should not be extra zeroes in a and b.
Input
The only line contains the positive decimal number x. The length of the line will not exceed 106. Note that you are given too large number, so you can't use standard built-in data types "float", "double" and other.
Output
Print the only line — the "simple exponential notation" of the given number x.
Examples
input
16
output
1.6E1
input
01.23400
output
1.234
input
.100
output
1E-1
input
100.
output
1E2
Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests. If you've seen these problems, a virtual contest is not for you - solve these problems in the archive. If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive. Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.
<form action="http://codeforces.com/problemset/problem/691/C?csrf_token=563cfc8a3f26679a5459b8deac98a7d5" class="submitForm" enctype="multipart/form-data" method="post">
</form>
Language: | <select name="programTypeId" style="font-family:verdana, arial, sans-serif;"><option value="10"> GNU GCC 5.1.0</option><option value="43"> GNU GCC C11 5.1.0</option><option selected="" value="1"> GNU G++ 5.1.0</option><option value="42"> GNU G++11 5.1.0</option><option value="2"> Microsoft Visual C++ 2010</option><option value="9"> C# Mono 3.12.1.0</option><option value="29"> MS C# .NET 4.0.30319</option><option value="28"> D DMD32 v2.069.2</option><option value="32"> Go 1.5.2</option><option value="12"> Haskell GHC 7.8.3</option><option value="23"> Java 1.7.0_80</option><option value="36"> Java 1.8.0_66</option><option value="19"> OCaml 4.02.1</option><option value="3"> Delphi 7</option><option value="4"> Free Pascal 2.6.4</option><option value="13"> Perl 5.20.1</option><option value="6"> PHP 5.4.42</option><option value="7"> Python 2.7.10</option><option value="31"> Python 3.5.1</option><option value="40"> PyPy 2.7.10 (2.6.1)</option><option value="41"> PyPy 3.2.5 (2.4.0)</option><option value="8"> Ruby 2.0.0p645</option><option value="49"> Rust 1.10</option><option value="20"> Scala 2.11.7</option><option value="34"> JavaScript V8 4.8.0</option></select> |
Choose file: | |
|
Submission | Time | Verdict |
---|---|---|
19198555 | Jul/18/2016 04:52 | Accepted |
19198494 | Jul/18/2016 04:47 | Wrong answer on test 1 |
No tag edit access