본문 바로가기

오블완21

[백준/파이썬] 32722번 Juta teekond -Codedef solution(idx, n): if idx == 1 and n != 1 and n != 3: return True if idx == 2 and n != 6 and n != 8: return True if idx == 3 and n != 2 and n != 5: return True return Falseflag = Truefor i in range(1, 4): n = int(input()) if solution(i, n): flag = Falseprint("JAH" if flag else "EI") 2024. 11. 21.
[백준/파이썬] 1440번 타임머신 -Codetime = list(map(int, input().split(":")))res = 0for i in range(3): for j in range(3): for k in range(3): if i != j != k and i != k: if 0 2024. 11. 20.
[백준/파이썬] 28932번 Префиксы-суффиксы -Codeint(input())list(map(int, input().split()))print(1, 1) 2024. 11. 19.
[백준/파이썬] 32684번 장기 -Codepoint = [13, 7, 5, 3, 3, 2]cho = list(map(int, input().split()))han = list(map(int, input().split()))cho_res, han_res = 0, 1.5for i in range(6): cho_res += point[i] * cho[i] han_res += point[i] * han[i]print("cocjr0208" if cho_res > han_res else "ekwoo") 2024. 11. 18.
[백준/파이썬] 19786번 Ставка -Codefor _ in range(int(input())): a, c = map(int, input().split()) r, g, b = map(int, input().split()) red = a * ((r + 1) ** 2 + g ** 2 + b ** 2) + c * min(r + 1, g, b) green = a * (r ** 2 + (g + 1) ** 2 + b ** 2) + c * min(r, g + 1, b) blue = a * (r ** 2 + g ** 2 + (b + 1) ** 2) + c * min(r, g, b + 1) if green = blue: print("RED") elif red = blue: print("GREE.. 2024. 11. 17.
[백준/파이썬] 28637번 Смена стиля -Codefor _ in range(int(input())): s = input() res = s[0].lower() for w in s[1:]: if w.isupper(): res += "_" + w.lower() continue res += w print(res) 2024. 11. 16.