728x90 반응형 SMALL 전체 글375 백준) 29163번 - python n,a= int(input()),list(map(int,input().split())) count= 0 for i in range(n): if a[i] % 2 == 0: count += 1 print("Happy" if count > n/2 else "Sad") 2024. 3. 4. 백준) 28927번 - python t1, e1, f1 = map(int, input().split()) t2, e2, f2 = map(int, input().split()) if t1 * 3 +e1 * 20 + f1 * 120 > t2 * 3 + e2 * 20 +f2 * 120 :print("Max") elif t1 * 3 +e1 * 20 +f1 * 120 == t2 * 3+ e2 * 20+f2 * 120 :print("Draw") else: print("Mel") 2024. 3. 3. 백준) 28701번 - python n = int(input()) result, lst, final = 0,[],0 for i in range(1,n+1): lst.append(i) result += i print(result) print(result ** 2) for i in range(len(lst)): final += lst[i] ** 3 print(final) 2024. 3. 2. 백준) 25314번 - python n = int(input()) a = "long " print(f"{a * (n//4)}int") 2024. 3. 1. 이전 1 ··· 82 83 84 85 86 87 88 ··· 94 다음 728x90 반응형 LIST