[Python] ๋ฐฑ์ค #2910 - ๋น๋ ์ ๋ ฌ
๋ฌธ์ https://www.acmicpc.net/problem/2910 2910๋ฒ: ๋น๋ ์ ๋ ฌ ์ฒซ์งธ ์ค์ ๋ฉ์์ง์ ๊ธธ์ด N๊ณผ C๊ฐ ์ฃผ์ด์ง๋ค. (1 ≤ N ≤ 1,000, 1 ≤ C ≤ 1,000,000,000) ๋์งธ ์ค์ ๋ฉ์์ง ์์ด์ด ์ฃผ์ด์ง๋ค. www.acmicpc.net ํ์ด from collections import Counter n,m = map(int,input().split()) arr = list(map(int,input().split())) x = Counter(arr).most_common() for a,b in x: for _ in range(b): print(a,end=' ') Counter(arr).most_common()๋ฅผ ์ฌ์ฉํด์ค๋ค. ๊บ ์์ฝ๋ฉ ๋ ์ฌ๋ผ๊ฐ๋ค!