【Basic Level】
*1024
#include <iostream>
#include <string>
using namespace std;
int main()
{
string s;
cin >> s;
int len = s.length();
if (s[0] == '-')
{
cout << '-';
}
size_t n = 0;
for (int i = 1; i < len; ++i)
{
if (s[i] == 'E')
{
n = i + 2;
break;
}
}
int a = stoi(s.substr(n));
double b = stod(s.substr(1, n - 3));
if (b == 0.0)
{
cout << s.substr(1, n - 3) << endl;
return 0;
}
if (a == 0)
{
cout << s.substr(0, n - 3) << endl;
return 0;
}
if (s[n - 1] == '-')
{
cout << 0 << '.';
while (--a)
{
cout << 0;
}
cout << s[1] << s.substr(3, n - 5);
}
else
{
if (a >= n - 5)
{
cout << s[1] << s.substr(3, n - 5);
a = a - n + 5;
while (a--)
{
cout << 0;
}
}
else
{
cout << s[1];
cout << s.substr(3, a) << '.' << s.substr(a + 3, n - a - 5);
}
}
cout << endl;
//system("pause");
return 0;
}