https://www.acmicpc.net/problem/15726
자료형을 조심해야 됩니다.
또한 연산의 순서도 중요합니다.
#include <iostream>
#include <cmath>
using namespace std;
using ll = long long;
ll nums[3];
int main()
{
ios::sync_with_stdio(0), cin.tie(0);
for (ll &num : nums)
{
cin >> num;
}
cout << max(nums[0] * nums[1] / nums[2], nums[0] * nums[2] / nums[1]);
return 0;
}
숫자는 움직이지 않는다는 점을 주의해야 합니다.
정수형으로 나누기를 먼저 할 시 소수점 아래가 잘립니다.
그리하여 추후 곱하기에서 소수점이 고려되지 않아 잘못된 값이 나올 수 있습니다.