#39317: 動手解題之前請先看這裡


n12603579table@gmail.com (施智皓)

學校 : 不指定學校
編號 : 145648
來源 : [36.234.171.196]
最後登入時間 :
2024-04-04 21:19:31
c012. 10062 - Tell me the frequencies! -- UVa10062 | From: [114.26.155.246] | 發表日期 : 2024-02-05 11:11

需要注意原UVa題目有很明確的要求ASCII code的範圍需介在 32至127之間(*包含邊界)且不能考慮'\r'(13)和'\n'(10),

尤其因為windows 系統的換行符號是'\r\n',所以'\r'在使用getline(cin,str) 時會被讀取進來,這裡要小心。

原題敘述 :

Given a line of text you will have to find out the frequencies of the ASCII characters present in it. The
given lines will contain none of the first 32 or last 128 ASCII characters. Of course lines may end with
\n and \r but always keep those out of consideration.

 
ZeroJudge Forum