
주어진 코드 #include #include #include int solution(int n, int votes[], int votes_len) { int arr[101] = { 0, }; for (int i = 0; i n / 2)//이때 n은 후보의 수 이다. return i; return -1; } int main() { int n1 = 3; int votes1[7] = { 1, 2, 1, 3, 1, 2, 1 }; int votes_len1 = 7; int ret1 = solution(n1, votes1, votes_len1); printf("sol..

주어진 코드 #include #include #include int solution(int calorie[], int calorie_len) { int min_cal = 0; int answer = 0; for (int i = 0; i min_cal) answer += calorie[i] - min_cal; else min_cal = calorie[i]; } return answer; } int main() { int calorie[] = { 713, 665, 873, 500, 751 }; int ret = solution(calorie, 5); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 ..

주어진 코드 #include #include #include int solution(int point) { if (point < 1000) return 0; return point / 100 * 100; } int main() { int point = 2323; int ret = solution(point); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(int point) { if (point < 1000) return 0; return point / 100 * 100; } int main() { int point = 2323; int ret = solution(point); prin..

주어진 코드 #include #include #include int solution(int classes[], int classes_len, int m) { int answer = 0; for (int i = 0; i < classes_len; i++) { answer += classes[i] m;//빈칸 if (classes[i] m != 0)//빈칸 answer++; } return answer; } int main() { int classes[] = { 80, 45, 33, 20 }; int m = 30; int ret = solution(classes, 4, m); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #in..

주어진 코드 #include #include #include char* func_a(char* bundle, int start, int n) { char* answer = (char*)malloc(sizeof(char) * n); for (int i = 0; i score2) { answer[0] = 1; answer[1] = score1; } else if (score1 < score2) { answer[0] = 2; ans..

주어진코드 #include #include #include int func_a(int passed, int non_passed) { return (passed > 1 && non_passed == 0); } int func_b(int scores[3]) { int answer = 0; if(scores[0] = 80) { answer++; } if(scores[1] >= 88) { answer++; } if(scores[..
- cospro기출
- programmers
- groomedu
- Cos Pro
- Java
- CosPro
- COSPRO 2급
- 1급
- 배열활용문제
- c언어 기출문제
- 연습문제
- c언어
- lv2
- 알고리즘
- 배열
- 프로그래머스
- 코스프로
- cospro기출문제
- 구름 기출문제
- lv1
- C
- groom
- YBM기출
- YBM
- 자바
- 구름에듀
- C++
- 코딩테스트
- 구름에듀 기출문제
- 기출문제
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 |