본문 바로가기 메뉴 바로가기

하늘리 개발일기

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

하늘리 개발일기

검색하기 폼
  • 분류 전체보기 (138)
    • [코테] (133)
      • [Programmers Lv1] (43)
      • [Programmers Lv2] (19)
      • [GroomEdu] (61)
      • [Programmers] (0)
      • [YBM-sample] (10)
    • [Android] (1)
      • 이론 (0)
      • Kotlin (0)
      • JAVA (0)
    • [반성문] (1)
    • [클론코딩] (1)
    • [React-Node.js] (0)
  • 방명록

C (67)
[COS PRO 2급] 6차 1번_저는 따뜻한 날이 좋아요 (C/C++)

주어진 코드 #include #include #include int solution(int temperature[], int temperature_len, int A, int B) { int answer = 0; //빈칸 return answer; } int main() { int temperature[] = { 3, 2, 1, 5, 4, 3, 3, 2 }; int temperature_len = 8; int A = 1; int B = 6; int ret = solution(temperature, temperature_len, A, B); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 완성 코드 #include #include #include int solution(..

[코테]/[GroomEdu] 2021. 5. 28. 18:00
[COS PRO 2급] 5차 10번_가장 오래 일한 사람을 구해주세요 (C/C++)

주어진 코드 #include #include #include int solution(int time_table[], int time_table_len, int n) { int answer = 0; //빈칸 return answer; } int main() { int time_table1[] = {1, 5, 1, 9}; int time_table_len1 = 4; int n1 = 3; int ret1 = solution(time_table1, time_table_len1, n1); printf("solution 함수의 반환 값은 %d 입니다.\n", ret1); int time_table2[] = {4, 8, 2, 5, 4, 6, 7}; int time_table_len2 = 7; int n2 = 4; i..

[코테]/[GroomEdu] 2021. 5. 28. 18:00
[COS PRO 2급] 5차 9번_시험 등수 구하기 (C/C++)

주어진 코드 #include #include #include int* solution(int score[], int score_len) { int* answer; //빈칸 return answer; } int main() { int score1[] = { 90, 87, 87, 23, 35, 28, 12, 46 }; int score_len1 = 8; int* ret1 = solution(score1, score_len1); printf("solution 함수의 반환 값은 ["); for (int i = 0; i < score_len1; i++) { if (i != 0) printf(", "); printf("%d", ret1[i]); } printf("] 입니다.\n"); int score2[] = { ..

[코테]/[GroomEdu] 2021. 5. 28. 18:00
[COS PRO 2급] 5차 8번_상수도 요금 구하기 (C/C++)

주어진 코드 #include #include #include int solution(int usage) { int answer = 0; if (usage > 30) answer = 20 * 430 + 10 * 570 + (usage - 20) * 840; else if (usage > 20) answer = 20 * 430 + (usage - 20) * 570; else answer = usage * 430; return answer; } int main() { int usage = 35; int ret = solution(usage); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 예시 usage return 35 26900 코드 문제점 if (usage > 30)..

[코테]/[GroomEdu] 2021. 5. 26. 18:32
[COS PRO 2급] 5차 7번_계산대 두개에서 계산시간 구하기 (C/C++)

주어진 코드 #include #include #include int solution(int stuffs[], int stuffs_len) { int answer = 0; int small_counter = 0; int general_counter = 0; for (int i = 0; i 3) general_counter += stuffs[i]; else small_counter += stuffs[i]; } if (small_counter < general_counter) answer = small_counter; else answer = general_counter; return answer; } int main() { int stuffs..

[코테]/[GroomEdu] 2021. 5. 26. 18:28
[COS PRO 2급] 5차 5번_n일장이 함께 열리는 날은 언제인가요? (C/C++)

주어진 코드 #include #include #include int solution(int a, int b) { int answer = 0; for (int i = 1; i

[코테]/[GroomEdu] 2021. 5. 25. 19:13
[COS PRO 2급] 5차 6번_이제 수학 시험에 모든걸 건다 평균 70을 위하여 (C/C++)

주어진 코드 #include #include #include int solution(int korean, int english) { int answer = 0; int math = 210 - korean + english; if (math > 100) answer = -1; else answer = math; return answer; } int main() { int korean = 70; int english = 60; int ret = solution(korean, english); printf("solution 함수의 반환 값은 %d 입니다.\n", ret); } 주어진 코드 결과 korean english return 70 60 80 코드 문제점 int math = 210 - korean + e..

[코테]/[GroomEdu] 2021. 5. 25. 19:13
[COS PRO 2급] 5차 4번_선수가 획득한 점수 (C/C++)

주어진 코드 #include #include #include int solution(int taekwondo, int running, int shooting[], int shooting_len) { int answer = 0; if (taekwondo >= 25) answer += 빈칸 ; else answer += taekwondo * 8; answer += 250 + (60 - running) * 5; int count = 0; for (int i = 0; i = 7) answer += 빈칸 ; return answer; } int main..

[코테]/[GroomEdu] 2021. 5. 24. 14:00
이전 1 2 3 4 5 6 7 8 9 다음
이전 다음
공지사항
  • About Me
최근에 올라온 글
TAG
  • 알고리즘
  • groomedu
  • 기출문제
  • cospro기출문제
  • Java
  • c언어 기출문제
  • lv2
  • YBM기출
  • groom
  • 구름 기출문제
  • 코딩테스트
  • YBM
  • lv1
  • 1급
  • 배열활용문제
  • 자바
  • 구름에듀 기출문제
  • C
  • 연습문제
  • C++
  • CosPro
  • cospro기출
  • 배열
  • programmers
  • c언어
  • 프로그래머스
  • Cos Pro
  • 구름에듀
  • COSPRO 2급
  • 코스프로
more
«   2025/06   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바