https://softeer.ai/practice/info.do?idx=1&eid=408&sw_prbl_sbms_sn=203337
Softeer
์ฐ์ต๋ฌธ์ ๋ฅผ ๋ด์ Set์ ์ ํํด์ฃผ์ธ์. ์ทจ์ ํ์ธ
softeer.ai
๋ฌธ์ ํด๊ฒฐ
8๊ฐ์ ์ซ์๊ฐ ์ ๋ ฅ๋์์ ๋ ascending, descending, mixed๋ง ๊ตฌ๋ณํด์ฃผ๋ฉด ๋๋ ๋ฌธ์ !
์ ๋ ฅ์ ๋ฐ์ ๋ join ํจ์๋ฅผ ํ์ฉํด์ string์ผ๋ก ๋ณํํด์ฃผ๊ณ ๋ฌธ์์ด ๋น๊ต๋ฅผ ํด์ฃผ๋ฉด ๋
์ฝ๋
import sys
input = sys.stdin.readline
num = ''.join(list(map(str, input().split())))
if num == '12345678':
print('ascending')
elif num == '87654321':
print('descending')
else:
print('mixed')'Coding' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [Softeer] ์ง๋ ์๋ ๊ตฌ์ถ (0) | 2023.05.24 |
|---|---|
| [Softeer] ์ฅ์ ๋ฌผ ์ธ์ ํ๋ก๊ทธ๋จ (0) | 2023.05.23 |
| [Softeer] ์ ๊ดํ (0) | 2023.05.18 |
| [Softeer] ํ์์ค ์์ฝ (0) | 2023.05.17 |
| [Softeer] ๋น๋ฐ ๋ฉ๋ด (0) | 2023.05.15 |
