80help!!!
查看原帖
80help!!!
1047089
li_zhi_a_wei楼主2023/9/18 21:22
#include <iostream>
using namespace std;
int main(){
	int s,x;
	double speed;
	double m;
	speed=7;
	cin >>s>>x;
	for(int i=0;i<(s+x);i++){
		m+=speed;
		speed*=0.98;
		if(m>=s-x){
			if(m<=x*2){
				cout <<'y'<<endl;
				return 0;
			}
			if(m>x*2){
				cout <<'n'<<endl; 
				return 0;
			} 
		}
	}
	return 0;
} 
2023/9/18 21:22
加载中...