#P1031. 關於list的入門題目十
關於list的入門題目十
題目描述
給定一個英文文章,統計每個單詞出現的次數,並按照字母順序輸出。
輸入格式
第一行是一個正整數n,表示文章的行數。接下來n行是文章的內容,每行不超過80個字符。文章中只包含英文字母,空格和標點符號。
輸出格式
按照字母順序輸出每個單詞及其出現次數,每個單詞一行,格式為:單詞:次數。忽略大小寫和標點符號。
Samples
3
To be, or not to be, that is the question:
Whether 'tis nobler in the mind to suffer'
The slings and arrows of outrageous fortune,
and:1
arrows:1
be:2
fortune:1
in:1
is:1
mind:1
nobler:1
not:1
of:1
or:1
outrageous:1
question:1
slings:1
suffer:1
that:1
the:3
tis:1
to:3
whether:1
原始資料
- Zero1 題號:
b032 - Hydro 題號:
Z1032 - Locale:
zh_TW - Display:
open