强行模拟 纪念一下……

 #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<math.h>
#include<string.h>
#include<string>
#include<map>
#include<vector>
#include<queue>
#define M(a,b) memset(a,b,sizeof(a))
using namespace std;
char str[];
char strr[];
queue<int>take;
int main(){
while(~scanf("%s",str)){
M(strr,NULL);
int len=strlen(str);
int i=,j;
while(true){
if(str[i]=='e') break;
else strr[i]=str[i];
if(str[i]=='.') j=i;
i++;
}
// printf("%s\n",strr);
int pow_=len--i;
int ll=str[i+]-'';
for(int k=;str[i+k];k++){
ll*=;
ll+=str[i+k]-'';
}
// printf("ll==%d\n",ll);
while((strr[j+]>=''&&strr[j+]<='')&&ll){
swap(strr[j],strr[j+]);
j++,ll--;
}
// printf("ll==%d\n",ll);
int from=;
while(true){
if(strr[from]=='') from++;
else break;
}
// printf("from==%d\n",from);
if(strr[j-]=='') from--;
if(from<) from=;
int lenn=strlen(strr);
// printf("%d %c %c\n",lenn,strr[lenn-1],strr[lenn-2]);
if(strr[lenn-]=='' && strr[lenn-]=='.'){
for(int q=;q<lenn-;q++)
printf("%c",strr[q]);
puts("");
continue;
}
if(j==i-&&ll==){
// printf("222223\n");
for(int q=from;q<i-;q++)
printf("%c",strr[q]);
puts("");
}
else if(ll!=){
// printf("1111111\n");
for(int q=;strr[q];q++){
if(strr[q]=='.') break;
else printf("%c",strr[q]);
}
while(ll){
printf("");
ll--;
}
puts("");
}
else{
// printf("22222\n");
for(int q=from;q<i;q++)
printf("%c",strr[q]);
puts("");
}
}
return ;
}

CodeForces 697B Barnicle 模拟的更多相关文章

  1. Codeforces 679B. Barnicle 模拟

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

  2. codeforces 697B Barnicle

    题目链接:http://codeforces.com/problemset/problem/697/B 题目大意: 将科学计数法用十进制表示.[如果类似于7.0应输出7] 解题思路: Java 中 B ...

  3. 【CodeForces 697B】Barnicle

    对科学计数法表示的数,输出其10进制的形式. c++来做,需要考虑这些细节: 当b==0,d==0时,只输出a. 当不需要补零的情况有两种: 一种是刚好是整数,只输出a(注意1.0e1的情况是输出1) ...

  4. Codeforces 389B(十字模拟)

    Fox and Cross Time Limit: 1000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u Submi ...

  5. codeforces 591B Rebranding (模拟)

    Rebranding Problem Description The name of one small but proud corporation consists of n lowercase E ...

  6. Codeforces 626B Cards(模拟+规律)

    B. Cards time limit per test:2 seconds memory limit per test:256 megabytes input:standard input outp ...

  7. Codeforces 631C. Report 模拟

    C. Report time limit per test:2 seconds memory limit per test:256 megabytes input:standard input out ...

  8. CodeForces 382C【模拟】

    活生生打成了大模拟... #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef unsig ...

  9. codeforces 719C (复杂模拟-四舍五入-贪心)

    题目链接:http://codeforces.com/problemset/problem/719/C 题目大意: 留坑...

随机推荐

  1. 效果网址http://sc.chinaz.com/tag_jiaoben/tupianlunbo.html

    http://sc.chinaz.com/tag_jiaoben/tupianlunbo.html

  2. jmeter命令行运行-分布式测试

    上一篇文章我们说到了jmeter命令行运行但是是单节点下的, jmeter底层用java开发,耗内存.cpu,如果项目要求大并发去压测服务端的话,jmeter单节点难以完成大并发的请求,这时就需要对j ...

  3. 利用Runtime给UITextView添加占位符(新方法)

     以前一直使用自定义UITextView通过通知中心来自定义placeHolder,最近看到这个方法,感觉更好 UITextView *textView = [[UITextView alloc]in ...

  4. iOS程序崩溃相关的处理办法

    一.bug追踪 1.捕获异常:Exception breakpoint 步骤: 2.终止调用:Symbolic breakpoint 步骤:前两步和一 基本是一样的,不截图了,只是在第二步选择的时候选 ...

  5. google谷歌翻译插件-网页一键翻译

    上个月转载的一篇博文,是推荐的四款非常实用的翻译插件,这几天看这个chrome插件网首页有新增了一个google谷歌翻译插件.我能说实话,这款插件比之前推荐的4款翻译插件更好用吗?也不能完全说是更好用 ...

  6. vector,list,deque

    stl提供了三个最基本的容器:vector,list,deque. vector和built-in数组类似,它拥有一段连续的内存空间,并且起始地址不变,因此它能非常好的支持随即存取,即[]操作符,但由 ...

  7. NVIC

    1中断:每一个中断都会对应一个服务程序 2NVIC 他的做用是负责中断优先级管理 3IP bit[7:4]每一个中断都有一个IP寄存器,用于设置中断相关的属性 AIRCR[10:8]只一个AIRCR寄 ...

  8. Php函数完整参考手册

    序号 分类 描述 1 Array 函数 2 Calendar 函数 日历扩展包含了简化不同日历格式间的转换的函数. 3 Date/Time 函数 Date/Time 函数用于从 PHP 脚本运行的服务 ...

  9. kubernetes port nodePort targetPort 理解

    port The port that the service is exposed on the service's cluster ip (virsual ip). Port is the serv ...

  10. $.ajax()方法详解 jquery中的ajax方法

    jquery中的ajax方法参数总是记不住,这里记录一下. 1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type: 要求为String类型的参数,请求方式(p ...