强行模拟 纪念一下……

 #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. HTML5学习总结——本地存储

    一.HTML4客户端存储 B/S架构的应用大量的信息存储在服务器端,客户端通过请求响应的方式从服务器获得数据,这样集中存储也会给服务器带来相应的压力,有些数据可以直接存储在客户端,传统的Web技术中会 ...

  2. 破译情报-NOIP2016提高组复赛模拟试题

    [题目描述] 最近国安人员截获了一份 RB 国的秘密情报, 全文都是经过加密的,每个单 词都很长.破译人员想到先把单词化简一下,方法是把每个单词尽量取短些的前 缀,但所取的前缀不能是其他单词的前缀. ...

  3. 在ueditor编辑器的光标停留处插入内容

    业务场景: 首先在ueditor编辑器中插入一段文本,然后我想在文本的某个位置(光标停留处)插入一个字符串,这个字符串是从页面的其他地方选择得来的. 注意,当我们点击ueditor编辑器以外的地方,编 ...

  4. 按键精灵*ff

    Function gethttp(URL) Set objXML=CreateObject("Microsoft.XMLHTTP") objXML.Open "Get&q ...

  5. 各种ps特效的网址

    粉笔字效果:http://www.jb51.net/photoshop/280740.html

  6. JSON中JObject和JArray,JValue序列化(Linq)

    http://blog.csdn.net/lovegonghui/article/details/50293629 一.JObject和JArray序列化 1.实例化JArray和JObject,然后 ...

  7. 七天学会ASP.NET MVC(1-3)源代码下载

    原文路径: 中文: http://www.cnblogs.com/powertoolsteam/p/MVC_one.html 英文:  http://www.codeproject.com/Artic ...

  8. MySQL-Front 出现“程序注册时间到期 程序将被限制模式下运行”解决方式

    MySQL-Front 出现“程序注册时间到期 程序将被限制模式下运行”解决方式 在用mysql-front的时候遇到显示:程序注册时间到期程序将被限制模式下运行.可以在“帮助”菜单下的点“登记”-- ...

  9. MarkDown初遇

    MarkDown初遇 纠结盘桓许久,由于那只胖纸,最终决定再次捡起博客这个东东,记录记录生活中.心灵里的点点滴滴. 寻觅的过程中忽然发现MarkDown这个东东,查了查,学习成本不高,简洁而标准,关键 ...

  10. python+selenium+Eclipse安装

    1.安装python 参考安装python:http://www.cnblogs.com/beyongblue/p/4215740.html 2.安装python管理工具setuptools 3.安装 ...