找数学关系..水题..具体看代码..
#include <iostream> #include <cstdio> #define ll long long using namespace std ; int main(){ double s , x ; cin >> s >> x ; double v = 7 , dis = 0 ; for ( ; dis <= s - x ; v *= 0.98 , dis += v ) ; if ( dis + v * 0.98 >= s + x ) cout << "n" << endl ; else cout << "y" << endl ; return 0 ; }