백준 1193 : 분수찾기
백준 (C99)/기본수학 1단계 (完) 2022. 1. 26. 12:20

#include int main() { int num, max = 0; scanf("%d", &num); while(num > 0) { max++; num -= max; } if(max % 2 == 0) printf("%d/%d\n", max+num, 1+(-num)); else printf("%d/%d\n", 1+(-num), max+num); return 0; } 이상한곳에서 너무 해매는듯

백준 2292 : 벌집
백준 (C99)/기본수학 1단계 (完) 2022. 1. 25. 23:23

#include int main() { int cnt=0, room = 0; int total = 1; scanf("%d", &room); while(1) { total += 6*cnt; if(room

백준 1712 : 손익분기점
백준 (C99)/기본수학 1단계 (完) 2022. 1. 25. 23:22

#include int main() { int A_price, B_price, C_price; scanf("%d %d %d", &A_price, &B_price, &C_price); if(C_price - B_price