强行模拟 纪念一下……

 #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. JDK版本问题 发展史

    jdk是 Java 语言的软件开发工具包,主要用于移动设备.嵌入式设备上的java应用程序.JDK(Java Development Kit) 是 Java 语言的软件开发工具包(SDK).SE(J2 ...

  2. [河南省ACM省赛-第三届] 房间安排 (nyoj 168)

    题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=168 分析:找到一天中需要最多的房间即可 #include<iostream> ...

  3. Elasticsearch .net 客户端条件拼接查询

    private Func<SearchDescriptor<BaseTest>, ISearchRequest> ConstructWhere(TestCondition wh ...

  4. Objective-C Runtime 运行时之一:类与对象(转载)

    Objective-C语言是一门动态语言,它将很多静态语言在编译和链接时期做的事放到了运行时来处理.这种动态语言的优势在于:我们写代码时更具灵活性,如我们可以把消息转发给我们想要的对象,或者随意交换一 ...

  5. js的兼容技巧

    javascript原生代码中经常会遇到各式各样浏览器不兼容的问题,浏览器真是倔强,解决浏览器的兼容是前端猿们的一大难题 为了避免在工作中遇到这些简单的问题.节约开发时间,在这里总结一些常用的浏览器兼 ...

  6. myeclipse连接数据库oracle(添加jdbc.properties)

    第一步:在src下面建一个包com.xsl.conf 第二步:在建好的包下面新建一个jdbc.properties 第三步:在jdbc.properties里写入内容如下: driver = orac ...

  7. Flexslider图片轮播、文字图片相结合滑动切换效果

    Flexslider是一款基于的jQuery内容滚动插件.它能让你轻松的创建内容滚动的效果,具有非常高的可定制性.开发者可以使用Flexslider轻松创建各种图片轮播效果.焦点图效果.图文混排滚动效 ...

  8. JavaScript里利用DOM获取宽高大全

    网页可见区域宽:document.body.clientWidth网页可见区域高:document.body.clientHeight网页可见区域宽:document.body.offsetWidth ...

  9. Servlet之保存用户偏好设置简单功能的实现

    写在前面: 先来陈述一下为什么会有这样一个需求和这篇博文. 这是公司的一个项目,我们负责前端,后台服务由其他公司负责.该系统有一个系统偏好设置模块,用户可以设置系统的背景图片等系统样式,因为这是一个比 ...

  10. iOS CFStringTransForm汉字转拼音

    CFStringTransform - (NSString *) phonetic:(NSString*)sourceString { NSMutableString *source = [sourc ...