UVa537 - Artificial Intelligence?-字符串(混合字符實數輸入)-難度3

題目鏈接:

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>




發佈了62 篇原創文章 · 獲贊 1 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章