1. 문제https://www.acmicpc.net/problem/24313 2. 풀이#include int main(void) { int a, b, c, n0; scanf("%d %d", &a, &b); scanf("%d", &c); scanf("%d", &n0); // 1. a가 c보다 크면 f(n)은 g(n)보다 커지므로 항상 0 출력 if (a > c) { printf("0\n"); } // 2. a가 c보다 작거나 같으면 else { // 3. b가 0 이하라면 f(n)은 항상 g(n)보다 작거나 같음 if (b (c - a) * n0) { printf("0\n"); ..
1. 문제https://www.acmicpc.net/problem/5073 2. 풀이#include int main(void) { int triangle[3] = { 0, }; while (1) { int equalCount = 0; int max = 0; int total = 0; // 한 줄 입력받기 scanf("%d %d %d", &triangle[0], &triangle[1], &triangle[2]); // 종료 조건 if (!triangle[0] && !triangle[1] && !triangle[2]) { return 0; } // 최대값과 총..
1. 문제https://www.acmicpc.net/problem/9063 2. 풀이#include int main(void) { int n; scanf("%d", &n); int x_arr[n]; int y_arr[n]; // 첫 번째 입력값을 읽고 최소/최대값으로 초기화 scanf("%d %d", &x_arr[0], &y_arr[0]); int x_max = x_arr[0]; int x_min = x_arr[0]; int y_max = y_arr[0]; int y_min = y_arr[0]; // 나머지 좌표 입력받으면서 비교 for(int i = 1; i x_max) x_max = x_arr[i]; if(x_a..
1. 문제https://www.acmicpc.net/problem/2581 2. 풀이#include int main(void) { int m, n; int total = 0; int min = 0; // 소수의 최소값 int isPrime; // 해당 수의 약수 개수 scanf("%d", &m); scanf("%d", &n); for (int i = m; i 0){ printf("%d\n%d", total, min); } else { printf("-1"); }}
1. 문제https://www.acmicpc.net/problem/9506 2. 풀이#include #include #define SIZE 1000typedef struct{ int data[SIZE]; int front, rear;} QueueType;void init(QueueType *Q){ Q->front = Q->rear = -1;}int isEmpty(QueueType *Q){ return Q->front == Q->rear;}int isFull(QueueType *Q){ return Q->rear == SIZE-1;}void enqueue(QueueType *Q, int e){ if(!isFull(Q)){ Q->rear++; Q->d..
1. 문제https://www.acmicpc.net/problem/5086 2. 풀이#include int main(void){ int tests[10001][2]; int results[10001]; int count = 0; int flag = 0; char factor[] = "factor\0"; char multiple[] = "multiple\0"; char neither[] = "neither\0"; while(1){ scanf("%d %d", &tests[count][0], &tests[count][1]); if(!tests[count][0] && !tests[count][1]){ results[count..
- Total
- Today
- Yesterday
- SW생명주기
- 점근적표기
- 배수
- 베라의 패션
- 파이썬
- 배수와약수
- 브라우저뜻
- 직사각형
- 27323
- SWLIfeCycle
- 과제안내신분
- 25314
- 알고리즘
- 다음소수
- 브라우저
- 개발계발
- C99
- 칸토어 집합
- 25304
- 약수들의합
- 삼각형과세변
- 약수
- 피보나치수5
- 백준
- 4779
- 붙임성 좋은 총총이
- 데이터추상화
- C언어
- 26069
- python
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |