求助大佬,40分过不去
查看原帖
求助大佬,40分过不去
772405
EDang20001楼主2022/8/23 14:35
#include <bits/stdc++.h>
using namespace std;
double s,x,l=0,v=7;
int main(){
    cin>>s>>x;
    if(l<s-x){
        l+=v;
        v*=0.98;
    }
    if(v<s+x-l) cout<<'y';
    else cout<<'n';
    return 0;
}

搞不懂为什么用while就可以了,换成if 就过不去了

2022/8/23 14:35
加载中...