#include<stdio.h>
#include<string.h>
int main(){
char str[20000],*p1,*p2;
gets(str);
if(str[0]=='-') putchar('-');
p1=p2=str+1;
while(*(++p2)!='E');
*(p2++)=0;
int coe;
sscanf(p2,"%d",&coe);
if(coe==0){
printf("%s",p1);
}
else if(coe<0){
coe=-coe;
printf("0.");
while(--coe) putchar('0');
putchar(*p1);
printf("%s",p1+2);
}
else{
putchar(*p1);
p1+=2;
while(coe && *p1){
coe--;
putchar(*p1);
p1++;
}
if(coe){
while(coe--) putchar('0');
}
if(*p1){
putchar('.');
printf("%s",p1);
}
}
return 0;
}
PAT(Basic Level)_1024_科学计数法
最新推荐文章于 2024-07-17 11:24:39 发布