K

@kimjuha19

복리 이자 계산기

C++
5 months ago
#include <iostream> using namespace std; class Savings { public: double balance; double rate; Savings(double b, double r) : balance(b), rate(r) {}

스마트 온도 조절기

C++
5 months ago
#include <iostream> using namespace std; class Thermostat { public: int temp; Thermostat(int t) : temp(t) {} void check_status() {

금고 비밀번호 시스템

C++
5 months ago
#include <iostream> #include <string> using namespace std; class Safe { public: string password; Safe(string pw) : password(pw) {}

택배 배송 추적기

C++
5 months ago
#include <iostream> #include <string> using namespace std; class Package { public: string id; string status; Package(string i) : id(i), status("준비중") {}

RPG 캐릭터 경험치 시스템

C++
5 months ago
#include <iostream> #include <string> using namespace std; class Player { public: string name; int level; int exp;

학원 등원 관리

Python
5 months ago
class Academy: def __init__(self, students): self.students = {name: False for name in students} def attendance(self, name): if name in self.students: self.students[name] = True else: print("등

실시간 평균값 계산기

Python
5 months ago
class Averager: def __init__(self): self.numbers = [] def add(self, num): self.numbers.append(num) def get_avg(self): if not self.numbers: return 0

농구 점수판

Python
5 months ago
class ScoreBoard: def __init__(self, team_name): self.team_name = team_name self.score = 0 def shot(self, point): if point == 2: self.score += 2 elif point == 3: self.score += 3

티켓 예매 시스템

Python
5 months ago
class Cinema: def __init__(self, title, seats): self.title = title self.seats = seats def reserve(self, count): if count > self.seats: print("예약 불가") else: self.seats -= count

복리 이자 계산기

Python
5 months ago
class Savings: def __init__(self, balance, rate): self.balance = balance self.rate = rate def pass_year(self): self.balance =self.balance * (1 + self.rate) savings = Savings(1000000, 0.10)

스마트 온도 조절기

Python
5 months ago
class Thermostat: def __init__(self, temp): self.temp = temp def check_status(self): if self.temp >= 28: print("에어컨 가동") elif self.temp <= 18: print("히터 가동")

금고 비밀번호 시스템

Python
5 months ago
class Safe: def __init__(self, password): self.password = password def open(self,pw): if pw == self.password: print("열였습니다") else: print("비밀번호가 다릅니다") safe = Safe("1234")

택배 배송 추적기

Python
5 months ago
class Package: def __init__(self, id): self.id = id self.status = "준비중" def update_status(self, new_status): self.status = new_status if self.status == "완료": print("배송이 끝났습니다")

RPG 캐릭터 경험치 시스템

Python
5 months ago
class Player: def __init__(self, name): self.name = name self.level = 1 self.exp = 0 def gain_exp(self, amount): self.exp += amount if self.exp >= 100: self.level += 1

색종이 영역

Python
5 months ago
paper = [(3, 7), (15, 7), (5, 2)] answer = set() for x,y in paper: for i in range(x,x+10): for j in range(y,y+10): answer.add((i,j)) print(len(answer))

일곱 난쟁이

Python
5 months ago
heights = [20, 7, 23, 19, 10, 15, 25, 8, 13] total = sum(heights) result = [] for i in range(9): for j in range(i + 1, 9): if total - heights[i] - heights[j] == 100: for k in range(9): if k != i and k != j:

분수 찾기

Python
5 months ago
X = 5 count = 0 diag = 1 while True: if count + diag >= X: pos = X - count if diag % 2 == 0: numerator = pos

주사위 쌓기

Python
5 months ago
snow = [3, 3, 6] if snow[0] == snow[1] == snow[2]: money = 10000 + snow[0] * 1000 elif snow[0] == snow[1] or snow[0] == snow[2]: money = 1000 + snow[0] * 100 elif snow[1] == snow[2]: money = 1000 + snow[1] * 100

벌집 탐색

Python
5 months ago
n = 13 count = 1 max_num = 1 while n > max_num: max_num += 6 * count count += 1 print(count)

지능형 기차

Python
5 months ago
data = [(0, 32), (3, 13), (28, 25), (39, 0)] people = 0 max = 0 for off, on in data: people = people - off + on if people > max: max = people