这道题就只是简单模拟😋
#include<bits/stdc++.h> using namespace std; #define int long long signed main() { double v=7,a=0; double s,x; cin>>s>>x; while(s-x>a) { a+=v; v*=0.98; } if(a+v>s+x) cout<<"yes"; else cout<<"no"; }
By signing up a 追梦算法网 universal account, you can submit code and join discussions in all online judging services provided by us.
Using your 追梦算法网 universal account