Codeforces 691C. Exponential notation(模拟)
来源:互联网 发布:mac能pdf能转换成ppt吗 编辑:程序博客网 时间:2024/05/17 03:09
题目链接
简单题意
把给出的数转化成科学计数法,要求整数部分非零且只有一位
思路
按题意模拟就好,注意一下细节就行了。
Python大法好
代码
s = input()if not '.' in s: s += '.'a,b = s.strip('0').split('.')if len(a) > 0: b = (a[1:] + b).rstrip('0') le = len(a)-1 a = a[0]else: le = len(b.strip('0')) - len(b) - 1 b = b.strip('0').rstrip('0') a = b[0] b = b[1:]print(a,end='')if len(b): print('.' + b,end='')if le : print('E'+str(le))
0 0
- Codeforces 691C. Exponential notation(模拟)
- Codeforces-691C-Exponential notation(模拟)
- CodeForces 691C Exponential notation(模拟)
- CodeForces 691C Exponential notation 模拟
- Codeforces 691C. Exponential notation 模拟
- 【模拟】Codeforces 691C Exponential notation
- Codeforces-691C Exponential notation(模拟)
- Codeforces - Educational Codeforces Round 14C - Exponential notation(模拟)
- CodeForces 691C Exponential notation
- codeforces 691C Exponential notation(思维 + 比较精妙的模拟)
- C. Exponential notation
- Exponential notation
- codeforces 591C (模拟)
- zoj 3826 Hierarchical Notation(模拟)
- PAT-A1073. Scientific Notation (20)(模拟)
- Codeforces 705C Thor (模拟)
- CodeForces 705C Thor (模拟)
- Codeforces 733C (模拟,贪心)
- 二叉查找树、B-树、B+树、B*树
- Mediacoder基本教程
- 如何创建一个大数据平台?
- python regex 使用示例
- myeclipse使用技巧、问题
- Codeforces 691C. Exponential notation(模拟)
- HTTP深入浅出之http请求和15中以上的请求方式
- View Animation
- POJ-1028Web Navigation,大水题坑我3遍
- UTF8 与 UTF8 +BOM 区别
- 欢迎使用CSDN-markdown编辑器
- DataTable添加Row,DataRow[]转换为DataTable
- 浮动定位与清理浮动
- ZTE面经