Logo
(追記) (追記ここまで)

29847번 - Character Frequencies 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB15912310578.358%

문제

John is preparing a printing press for a publication. He needs to check that he has enough of type pieces---little blocks of cast metal with the shapes of characters on them. To help John, write a program to count the number of times each character appears in his text.

입력

The first line of input contains $N,ドル the number of lines in John's publication (1ドル \le N \le 1,000円$). The following $N$ lines contain the text. Each line may consist of up to 100ドル$ characters. The text may contain uppercase and lowercase letters, digits, and punctuation marks.

출력

Output the frequency table of the characters that appear in the input text. On each line, output one character and its frequency (the number of times it appears in the text), spearated by a space. The lines may be listed in any order. Do not count the spaces and line breaks as characters.

제한

예제 입력 1

4
A printing press is a mechanical device
for applying pressure to an inked surface
resting upon a print medium (such as paper
or cloth), thereby transferring the ink.

예제 출력 1

( 1
) 1
, 1
. 1
A 1
a 10
b 1
c 6
d 3
e 15
f 3
g 4
h 5
i 12
k 2
l 3
m 3
n 12
o 5
p 9
r 14
s 10
t 8
u 5
v 1
y 2

힌트

출처

Olympiad > Estonian Informatics Olympiad > 2021-22 > Open Competition 1번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /