这不能算是数论题。。。
卡精度这事noip也做的出来。。
代码
#include <cmath> #include <cstdio> int n, ans; double h, s1, v, l, k, r = 0.0001; inline bool check(double x) { double t1 = sqrt((h - k - r) / 5.0), t2 = sqrt(h / 5.0); double t3 = (s1 - x - r) / v, t4 = (s1 - x + l + r) / v; if(t1 > t4 || t2 < t3) return 0; return 1; } int main() { scanf("%lf %lf %lf %lf %lf %d", &h, &s1, &v, &l, &k, &n); for(int i = 0; i < n; i++) ans += check(i); printf("%d ", ans); return 0; }