백준2362 [백준/파이썬] 30310번 Finding Forks -Code n = int(input()) forks = sorted(list(map(int, input().split()))) print(forks[0] + forks[1]) 2024. 2. 25. [백준/파이썬] 24296번 ЛИНИЯ -Code n = int(input()) res, flag = 2, False while True: temp = res while True: if temp == n: flag = True break if temp > n: break temp += temp - 1 if flag: break res += 1 print(res) 2024. 2. 24. [백준/Java] 24296번 ЛИНИЯ -Code import java.util.Scanner; public class _24296 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int res = 2; boolean flag = false; while (true) { int temp = res; while (true) { if (temp == n) { flag = true; break; } if (temp > n) { break; } temp += temp - 1; } if (flag) { break; } res++; } System.out.println(res); } } 2024. 2. 23. [백준/파이썬] 7130번 Milk and Honey -Code m, h = map(int, input().split()) res = 0 for _ in range(int(input())): c, b = map(int, input().split()) res += c * m if c * m > b * h else b * h print(res) 2024. 2. 23. [백준/파이썬] 24313번 알고리즘 수업 - 점근적 표기 1 -Code a1, a0 = map(int, input().split()) c = int(input()) n0 = int(input()) if a1 * n0 + a0 2024. 2. 22. [백준/파이썬] 11520번 And Then There Was 5 -Code for _ in range(int(input())): p, d = map(int, input().split()) print(d, 5) 2024. 2. 21. 이전 1 ··· 58 59 60 61 62 63 64 ··· 394 다음