NYPC에서 풀었던 문제와 유사하다.


NYPC문제때는 급수를 이용해서 풀었었는데 틀리다고 나왔었다.


#include <cstdio>
/**
* https://www.acmicpc.net/problem/14924
* BOJ 백준온라인져지 14924 폰 노이만과 파리 풀이
*/
int main(){
int trainVelocity, aFlyVelocity, distance;
scanf("%d%d%d", &trainVelocity, &aFlyVelocity, &distance);
printf("%d", distance / (trainVelocity * 2) * aFlyVelocity);
}
view raw BOJ_14924.cpp hosted with ❤ by GitHub


+ Recent posts