
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
int solution(int num1, int num2) {
int answer = (num1 *1000/ num2 * 1000)/1000 ;
return answer;
}
위 코드에서는 1000을 곱하고 1000을 다시 나누는 것이므로 생략할 수 있다.
따라서 중복된 부분을 삭제하면 아래 코드와 같다.
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
int solution(int num1, int num2) {
int answer = (num1 *1000/ num2) ;
return answer;
}