ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

728x90
๋ฐ˜์‘ํ˜•

๋ฌธ์ œ

 

SW Expert Academy

SW ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์—ญ๋Ÿ‰ ๊ฐ•ํ™”์— ๋„์›€์ด ๋˜๋Š” ๋‹ค์–‘ํ•œ ํ•™์Šต ์ปจํ…์ธ ๋ฅผ ํ™•์ธํ•˜์„ธ์š”!

swexpertacademy.com

 

๋ฌธ์ œ ํ’€์ด

 0 ~ 9์˜ ์ˆซ์ž๊ฐ€ ๋ฌธ์ž์—ด "ZRO", "ONE", "TWO", "THR", "FOR", "FIV", "SIX", "SVN", "EGT", "NIN"์™€ ๊ฐ™์ด ์ฃผ์–ด์งˆ ๋•Œ ๋ฌธ์ž์—ด ์ˆœ์ด ์•„๋‹Œ ์ˆซ์ž ์ˆœ์œผ๋กœ ์ •๋ ฌ ํ›„์— ์ถœ๋ ฅํ•˜๋Š” ๋ฌธ์ œ์ด๋‹ค. ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋”•์…”๋„ˆ๋ฆฌ๋ฅผ ํ™œ์šฉํ•˜๋ฉด ์‰ฝ๊ฒŒ ํ’€ ์ˆ˜ ์žˆ๋‹ค.

 

์ฝ”๋“œ

digit_to_string = {
    0: "ZRO",
    1: "ONE",
    2: "TWO",
    3: "THR",
    4: "FOR",
    5: "FIV",
    6: "SIX",
    7: "SVN",
    8: "EGT",
    9: "NIN"
}

string_to_digit = {value: key for key, value in digit_to_string.items()}

test_case = int(input())
for t in range(1, test_case + 1):
    # #1 ์‚ฌ์ด์ฆˆ๋Š” ํ•„์š” ์—†์œผ๋ฏ€๋กœ input๋งŒ ๋ฐ›์Œ.
    input()
    digit = sorted([string_to_digit.get(s) for s in input().split()])
    string = [digit_to_string.get(d) for d in digit]
    print('#' + str(t), *string)

 

728x90
๋ฐ˜์‘ํ˜•

'๐Ÿ‘จโ€๐Ÿ’ป ์ฝ”๋”ฉํ…Œ์ŠคํŠธ > SWEA' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

SWEA: 1234 ๋น„๋ฐ€๋ฒˆํ˜ธ  (0) 2020.10.07
SWEA: 1225 ์•”ํ˜ธ์ƒ์„ฑ๊ธฐ  (0) 2020.10.07
SWEA: 1220 Magnetic  (0) 2020.10.07
SWEA: 1215 ํšŒ๋ฌธ1  (0) 2020.10.07
SWEA: 1209 Sum  (0) 2020.10.07
๋Œ“๊ธ€
๊ธ€ ๋ณด๊ด€ํ•จ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€