목록전체 글 (142)
컴공댕이 공부일지
1) 두 수 비교하기 백준 1330번 #include int main() { int a,b=0; scanf("%d %d", &a, &b); if(a>b) { printf(">"); } else if (a=90 && g=80 && g=70 && g=60 && g0 && y>0) { printf("1"); } else if (x0) { printf("2"); } else if (x

https://solved.ac/problems/sprout 1) 입력값의 합 출력하기 백준 1000번 #include int main() { int a,b=0; scanf("%d",&a); scanf("%d",&b); printf("%d", a+b); return 0; } 2) 입력값의 차 출력하기 백준 1001번 #include int main() { int a,b=0; scanf("%d",&a); scanf("%d",&b); printf("%d", a-b); return 0; } 3) 입력값의 곱 출력하기 백준 10998번 #include int main() { int a,b=0; scanf("%d",&a); scanf("%d",&b); printf("%d", a*b); return 0; } 4) ..
https://solved.ac/problems/sprout 1) Hello World 출력하기 2557번 #include int main() { printf("Hello World!"); return 0; } 2) 오늘 날짜 출력하기 10699번 #include int main() { printf("2022-08-31"); return 0; } 3) 내 아이디와 맞힌 문제 수 출력하기 7287번 #include int main() { printf("7\nsomi5488"); return 0; } 4) 고양이 그림 출력하기 10171번 #include int main() { printf("\\ /\\ \n ) ( \')\n( / ) \n \\(__)|"); return 0; } 5) 강아지 그림 출력하기..
[ 2022년 8월 29일 정모 문제 풀이 모음 ] #1. 해결 일곱 난쟁이 (백준 2309번) #include int main() { int arr[9]; int result[7]; int sum=0; //9명의 총 합! int over=0; //100에서 얼마가 넘쳤는지 저장! int r1=0; int r2=0; //가짜 난쟁이 둘!! int x=0; for(int i=0; i
[ 2022년 8월 22일 정모 문제 풀이 모음 ] #1. 미해결 제곱수 찾기(백준 1025번) #2. 해결 직사각형에서 탈출(백준 1085번) #include int main() { int x,y,w,h=0; int dw, dh=0; int result=0; scanf("%d",&x); scanf("%d",&y); scanf("%d",&w); scanf("%d",&h); if(w-x>x){ dw=x; } else{ dw=w-x; } if(h-y>y){ dh=y; } else{ dh=h-y; } if(dw>dh){ result=dh; } else{ result=dw; } printf("%d",result); return 0; } #3. 해결(백준 채점 시간초과) 제로(백준 10773번) #include ..