
주어진 코드 #include #include #include char* solution(int tile_length) { char* answer = (char*)malloc(sizeof(char) * (tile_length + 1)); char com[6] = { 'R','R','R','G','G','B' }; if (tile_length % 6 == 1 || tile_length % 6 == 2 || ) //빈칸 strcpy(answer, "-1"); else { for (int i = 0; i < tile_length; i++) answer[i] = com[i % 6]; answer[tile_length] = '\0'; } return answer; } int main() { int tile_leng..

주어진 코드 #include #include #include int solution(int member_age[], int member_age_len, char* transportation) { int adult_expense = 0; int child_expense = 0; if (!strcmp(transportation, "Bus")) { adult_expense = 40000; child_expense = 15000; } else if (!strcmp(transportation, "Ship")) { adult_expense = 30000; child_expense = 13000; } else if (!strcmp(transportation, "Airplane")) { adult_expense = 7..

주어진 코드 #include #include #include int solution(int scores[], int scores_len) { int answer = 0; //빈칸 return answer; } int main() { int scores1[10] = { 35, 28, 98, 34, 20, 50, 85, 74, 71, 7 }; int scores1_len = 10; int ret1 = solution(scores1, scores1_len); printf("solution 함수의 반환 값은 %d 입니다.\n", ret1); int scores2[5] = { 1, 1, 1, 1, 1 }; int scores2_len = 5; int ret2 = solution(scores2, scores2_le..

주어진 코드 #include #include #include int solution(char* words[], int words_len, char* word) { int count = 0; //빈칸 return count; } int main() { char* words[3] = { "CODE", "COED", "CDEO" }; int words_len = 3; char* word = "CODE"; int ret = solution(words, words_len, word); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(char* words[], int words_len, char* ..

주어진 코드 #include #include #include int compare(const void* a, const void* b) { return (*(int*)b - *(int*)a); } int func_a(int scores[], int scores_len, int score) { for (int rank = 0; rank < scores_len; rank++) if (scores[rank] == score) return rank + 1; return 0; } void func_b(int arr[], int arr_len) { qsort(arr, arr_len, sizeof(int), compare); } int func_c(int arr[], int n) { return arr[n]; } i..

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