那么你很有可能是精度问题。
尝试在强制转换时加上 (long double)。
(long double)
AC:
y = floor((long double)1.0 * x * u / v);
WA:
y = floor(1.0 * x * u / v);