60求助!!!
查看原帖
60求助!!!
767417
Serendi_Pity楼主2023/1/26 17:22
#include<bits/stdc++.h>
using namespace std;
int main(){
    double s,n;
    int c=0;
    cin>>s>>n;
    if(s>n){
        cout<<"n";return 0;
    }
    for(double i=7;i<0;i*=0.98){
        c+=i;
        if(c>=(s-n)&&c<=(s+n)&&!((c+=i*0.98)>(s-n)&&(c+=i*0.98)<(s+n))){
            cout<<"y";return 0;
        }
    }
    cout<<"n";
}
2023/1/26 17:22
加载中...