Algorithm/ํ๋ก๊ทธ๋๋จธ์ค
[ํ๋ก๊ทธ๋๋จธ์ค] [3์ฐจ] ํ์ผ๋ช
์ ๋ ฌ (Python)
1. ๋ฌธ์ ์ค๋ช
๋ฌธ์ ๋งํฌ ์
๋ ฅ : ํ์ผ์ด๋ฆ๋ค ์ถ๋ ฅ : ๋ฌธ์๋ถ๋ถ, ์ซ์๋ถ๋ถ, ๋จ์ ๋ถ๋ถ์ผ๋ก ๋๋์ด์ ์ ๋ ฌ๊ธฐ์ค์ ๋ง๊ฒ ์ ๋ ฌ๋ ํ์ผ๋ช
์ถ๋ ฅ 2. ์ฝ๋ solution1.py from functools import cmp_to_key def compare(s1,s2): head1, number1, tail1 = s1[0], s1[1], s1[2] head2, number2, tail2 = s2[0], s2[1], s2[2] head1, head2 = head1.upper(), head2.upper() #์๋ฐ๋ฒณ ๊ตฌ๋ถ ์์ผ๋๊น number1, number2 = int(number1), int(number2) #๋น๊ต๋ฅผ ์ํด intํ if head1 != head2: return -1 if head1 < head2 ..