make a splash
728x90
article thumbnail
[Hackerrank] Grading Students
문제풀이/C 2020. 9. 20. 02:09

Practice > Algorithms > Implementation > Grading Students 문제 학생의 점수를 받고, 성적을 낸다. 점수의 다음 5의 배수와 3미만의 차이가 날 경우 다음 5의 배수로 점수를 올린다. 하지만 38점 보다 작으면 점수를 올리지 않고 유지한다. Input Format int n : the number of students line i : grades[i] 풀이 매개변수: int grades_count, int* grades, int* result_count grades_count 학생 수, grades 학생 점수가 들어있는 배열 리턴할 *result를 grades_count(학생 수) 크기만큼 할당. if (38점 이상이면) { 최종 점수 조정 } else { 3..

728x90