๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

Algorithm/์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์Šคํ„ฐ๋””

(3)
์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์Šคํ„ฐ๋”” 4์ฃผ์ฐจ 1. 2016๋…„ def solution(a, b): date = ['FRI','SAT','SUN','MON','TUE','WED','THU'] month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] cnt = 0 for i in range(a-1): cnt += month[i] ans = (cnt + b) % 7 return date[ans-1] 2. ๋ฌธ์ž์—ด ๋‹ค๋ฃจ๊ธฐ ๊ธฐ๋ณธ def solution(s): if len(s) == 4 and s.isdigit(): return True elif len(s) == 6 and s.isdigit(): return True else: return False 3. ๋ฌธ์ž์—ด ๋‚ด๋ฆผ์ฐจ์ˆœ์œผ๋กœ ๋ฐฐ์น˜ํ•˜๊ธฐ def solution(s): s..
์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์Šคํ„ฐ๋”” 3์ฃผ์ฐจ 1. ๋‹คํŠธ๊ฒŒ์ž„ def solution(dart): ans = [] for i in range(len(dart)): if dart[i] =='S': if dart[i-1] == '0' and dart[i-2] == '1': ans.append(10) else: ans.append(int(dart[i-1])) elif dart[i] == 'D': if dart[i-1] == '0' and dart[i-2] == '1': ans.append(10**2) else: ans.append(int(dart[i-1])**2) elif dart[i] == 'T': if dart[i-1] == '0' and dart[i-2] == '1': ans.append(10**3) else: ans.append(int(dart[i-..
์ฝ”๋”ฉํ…Œ์ŠคํŠธ ์Šคํ„ฐ๋”” 1์ฃผ์ฐจ (4/25 ~ 5/1) 1. ์‹ ๊ณ  ๊ฒฐ๊ณผ ๋ฐ›๊ธฐ [Programmers] ์‹ ๊ณ  ๊ฒฐ๊ณผ ๋ฐ›๊ธฐ ๋ฌธ์ œ ๋ฌธ์ œ ์„ค๋ช… ์‹ ์ž…์‚ฌ์› ๋ฌด์ง€๋Š” ๊ฒŒ์‹œํŒ ๋ถˆ๋Ÿ‰ ์ด์šฉ์ž๋ฅผ ์‹ ๊ณ ํ•˜๊ณ  ์ฒ˜๋ฆฌ ๊ฒฐ๊ณผ๋ฅผ ๋ฉ”์ผ๋กœ ๋ฐœ์†กํ•˜๋Š” ์‹œ์Šคํ…œ์„ ๊ฐœ๋ฐœํ•˜๋ ค ํ•ฉ๋‹ˆ๋‹ค. ๋ฌด์ง€๊ฐ€ ๊ฐœ๋ฐœํ•˜๋ ค๋Š” ์‹œ์Šคํ…œ์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๊ฐ ์œ ์ €๋Š” ํ•œ ๋ฒˆ์— ํ•œ wm05028.tistory.com 2. ๋กœ๋˜์˜ ์ตœ๊ณ  ์ˆœ์œ„์™€ ์ตœ์ €์ˆœ์œ„ [Programmers] ๋กœ๋˜์˜ ์ตœ๊ณ  ์ˆœ์œ„์™€ ์ตœ์ € ์ˆœ์œ„ ๋ฌธ์ œ ๋กœ๋˜ 6/45(์ดํ•˜ '๋กœ๋˜'๋กœ ํ‘œ๊ธฐ)๋Š” 1๋ถ€ํ„ฐ 45๊นŒ์ง€์˜ ์ˆซ์ž ์ค‘ 6๊ฐœ๋ฅผ ์ฐ์–ด์„œ ๋งžํžˆ๋Š” ๋Œ€ํ‘œ์ ์ธ ๋ณต๊ถŒ์ž…๋‹ˆ๋‹ค. ์•„๋ž˜๋Š” ๋กœ๋˜์˜ ์ˆœ์œ„๋ฅผ ์ •ํ•˜๋Š” ๋ฐฉ์‹์ž…๋‹ˆ๋‹ค. 1 6๊ฐœ ๋ฒˆํ˜ธ๊ฐ€ ๋ชจ๋‘ ์ผ์น˜ 2 5๊ฐœ ๋ฒˆํ˜ธ๊ฐ€ ์ผ์น˜ 3 4๊ฐœ wm05028.tistory.com 3. ๋‚ด์  [Programmers] ๋‚ด์  ๋ฌธ์ œ ๊ธธ์ด๊ฐ€ ๊ฐ™์€ ๋‘ 1์ฐจ์› ์ •์ˆ˜ ๋ฐฐ์—ด a, b๊ฐ€..