传送门
本来想shui道题,结果85分,我懵了
#include<bits/stdc++.h>
using namespace std;
int s,x;
double cnt=0;
double speed = 7;
int main()
{
cin>>s>>x;
int ma=s+x,mi=s-x;
while(1){
if(cnt>ma){
cout<<'n' ;
return 0;
}
if(cnt>=mi&&cnt<=ma){
cnt+=speed;
if(cnt>ma){
cout<<'n';
return 0;
}else{
cout<<'y';
return 0;
}
}
cnt+= speed;
speed*=0.98;
}
return 0;
}