B. Barnicle
time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the distance between him and the girl to make his shot accurate.

Barney asked the bar tender Carl about this distance value, but Carl was so busy talking to the customers so he wrote the distance value (it's a real number) on a napkin. The problem is that he wrote it in scientific notation. The scientific notation of some real number x is the notation of form AeB, where A is a real number and B is an integer andx = A × 10B is true. In our case A is between 0 and 9 and B is non-negative.

Barney doesn't know anything about scientific notation (as well as anything scientific at all). So he asked you to tell him the distance value in usual decimal representation with minimal number of digits after the decimal point (and no decimal point if it is an integer). See the output format for better understanding.

Input

The first and only line of input contains a single string of form a.deb where ad and b are integers and e is usual character 'e' (0 ≤ a ≤ 9, 0 ≤ d < 10100, 0 ≤ b ≤ 100) — the scientific notation of the desired distance value.

a and b contain no leading zeros and d contains no trailing zeros (but may be equal to 0). Also, b can not be non-zero if a is zero.

Output

Print the only real number x (the desired distance value) in the only line in its decimal notation.

Thus if x is an integer, print it's integer value without decimal part and decimal point and without leading zeroes.

Otherwise print x in a form of p.q such that p is an integer that have no leading zeroes (but may be equal to zero), and qis an integer that have no trailing zeroes (and may not be equal to zero).

Examples
input
8.549e2
output
854.9
input
8.549e3
output
8549
input
0.33e0
output
0.33
提醒:试试1.038e0,0.0e0,7.0e100,0.0e2这几个样例可以改好多次代码。。(我就是wa在这些)
 #include<bits/stdc++.h>
using namespace std;
char a[]= {};
int main(void)
{
int ex=;
scanf("%c.%[0-9]e%d",&a[],a+,&ex);
int len=strlen(a);
int flag=;
for(int i=; i<len; i++)
{
if(a[i]!='')
{
flag=;
}
}
if(flag==&&ex==)
printf("%c",a[]);
else
{
for(int i=; i<ex+||a[i]!=; i++)
{
if(i==ex+) printf(".");
printf("%c",a[i]==?'':a[i]);
}
}
printf("\n");
return ;
}
 

Codeforces Round #362 (Div. 2)->B. Barnicle的更多相关文章

  1. Codeforces Round #362 (Div. 2) A.B.C

    A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standar ...

  2. Codeforces Round #362 (Div. 2) C. Lorenzo Von Matterhorn (类似LCA)

    题目链接:http://codeforces.com/problemset/problem/697/D 给你一个有规则的二叉树,大概有1e18个点. 有两种操作:1操作是将u到v上的路径加上w,2操作 ...

  3. #map+LCA# Codeforces Round #362 (Div. 2)-C. Lorenzo Von Matterhorn

    2018-03-16 http://codeforces.com/problemset/problem/697/C C. Lorenzo Von Matterhorn time limit per t ...

  4. Codeforces Round #362 (Div. 2) B 模拟

    B. Barnicle time limit per test 1 second memory limit per test 256 megabytes input standard input ou ...

  5. Codeforces Round #362 (Div. 2)

    闲来无事一套CF啊,我觉得这几个题还是有套路的,但是很明显,这个题并不难 A. Pineapple Incident time limit per test 1 second memory limit ...

  6. 【转载】【树形DP】【数学期望】Codeforces Round #362 (Div. 2) D.Puzzles

    期望计算的套路: 1.定义:算出所有测试值的和,除以测试次数. 2.定义:算出所有值出现的概率与其乘积之和. 3.用前一步的期望,加上两者的期望距离,递推出来. 题意: 一个树,dfs遍历子树的顺序是 ...

  7. Codeforces Round #362 (Div. 2)->A. Pineapple Incident

    A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standar ...

  8. Codeforces Round #362 (Div. 2) A 水也挂

    A. Pineapple Incident time limit per test 1 second memory limit per test 256 megabytes input standar ...

  9. Codeforces Round #362 (Div. 2) D. Puzzles

    D. Puzzles time limit per test 1 second memory limit per test 256 megabytes input standard input out ...

随机推荐

  1. H5笔记——locaStorage和sessionStorage本地存储的一些坑

    当使用window.localStorage或者window.sessionStorage 存储json数据时需要将json数据用JSON.stringify(data)转换成json字符串再存储在本 ...

  2. C++ Stacks(堆栈)

    C++ Stack(堆栈) 是一个容器类的改编,为程序员提供了堆栈的全部功能,——也就是说实现了一个先进后出(FILO)的数据结构. 操作 比较和分配堆栈 empty() 堆栈为空则返回真 pop() ...

  3. C++ Strings(字符串)

    Constructors 构造函数,用于字符串初始化 Operators 操作符,用于字符串比较和赋值 append() 在字符串的末尾添加文本 assign() 为字符串赋新值 at() 按给定索引 ...

  4. C++封装常用对象和对头文件以及预编译机制的探索

    在C++实际开发中,难免会使用到一些你极为常用的算法(比如笔者经常使用的多线程技术),实现这些算法的类或是全局函数或是命名空间等等经常都要被使用多次,你会有哪些办法来使用呢?笔者有4个办法. 第一个方 ...

  5. 一款功能强大的iphone购物应用源码

    一款功能强大的iphone购物应用源码,这款应用源码比较完整的,并且还支持信用卡支付服务等功能的,基本实现了我们常用的购物应用功能了,实现商品的基本展示功能,还具有完整的用户管理,以及完整的购物流程等 ...

  6. zedboard U盘挂载+交叉编译helloworld

    交叉编译环境见http://blog.csdn.net/xiabodan/article/details/22717175 1:编写hello.c文件 #include<stdio.h> ...

  7. C#实现发送邮件——核心部分代码

    在KS系统中有个发送邮件的功能需要做上网查阅资料以后,通过自己的部分修改实现了发送邮件的功能话不多说先来个界面: 邮件发送分一下步骤: 1.smtp服务信息设置 2.验证发件人信息 3.添加附件 4. ...

  8. 【Timers】win服务 定时器

    win服务: using System.ServiceProcess; 继承 ServiceBase 即可 定时器: private System.Timers.Timer PushOrderTime ...

  9. iOS学习笔记之typedef

    typedef unsigned long long weiboId; typedef 定义一个使用方便的类型,谓之为“宏定义“. unsigned long long 是一种无符号的长长整型.本应该 ...

  10. Notes of the scrum meeting(10/28)

    meeting time:4:00~6:00p.m.,October 28th,2013 meeting place:雕刻时光 attendees: 顾育豪                       ...