摘要:
水题一个,贴个代码吧。 #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <string> #include <map> using namespace std; const 阅读全文
摘要:
又是一道字符串处理的题目。。。 题意:给出两个浮点数,询问它们保留n位小数的科学计数法(0.xxx*10^x)是否相等。根据是和否输出相应答案。 思路:先分别将两个浮点数转换成相应的科学计数法的格式1.point为小数点的索引,初始化为字符串的长度len2.not0位第一个非0的数字的索引,初始化为 阅读全文