3AC2WA求助
查看原帖
3AC2WA求助
680434
shumu楼主2023/9/21 19:29
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    double s,x,speed=7;
    cin>>s>>x;
    for(int i=0;s>=0;i++) {
            s -= speed;
            speed*=0.98;
            if(s<=x) {
                     if(speed>x) {
                                  cout<<"n";
                                  break;
                                  }
                     else {
                          cout<<"y";
                          break;
                          }
                               }
                      }
    //system("pause");
}

2023/9/21 19:29
加载中...