题目链接:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=96&page=show_problem&problem=350
代码+思路
/* * 1.用字符输入,当碰到实数的时候换实数输入,省去了把字符转换为实数的步骤 * 2.每次遇见'\n'或者文件输入结束,跳出一个循环 * 3.每种物理量都有m,k,M三个单位 */ #include <iostream> #include <cmath> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <string> using>