A number is provided as a string, it may be in scientific notation like 1e3 or 2.50E-1. Output it as normal decimal without exponent and remove extra trailing zeros.
• First line: A string representing a number
• It may be in scientific notation (e.g., 1e3, 2.50E-1)
• Or a normal decimal number
• Print the number in normal decimal form
• Do not use exponent format
• Remove unnecessary trailing zeros
• Do not keep trailing decimal point
• The input is a valid numeric string
• Length ≤ 10^5
Input: 2.50E-1
Scientific meaning:
2.50 × 10⁻¹ = 0.25
Remove trailing zeros → 0.25
If input was:
• 1e3 → Output 1000
• 3.0000 → Output 3
• 5.2300 → Output 5.23
1.Read the number as a string.
2.Convert it to a Decimal (from decimal module) to correctly handle scientific notation.
3.Convert the Decimal value to normal string format (no exponent).
4.If there is a decimal point:
• Remove trailing zeros after decimal.
• If decimal point remains at the end, remove it.
5.Print the final formatted string.