60分求助,2、3点
查看原帖
60分求助,2、3点
668222
Blue_cat楼主2022/1/28 12:23
#include <cstdio>
#include <iostream>
//#include <cstdlib>
//#include <windows.h>
//#include <Windowsx.h>
//#include <process.h>
//#include <winnt.h>
//#include <stddef.h>
//#include <fstream>
//#include <cmath>
//#include <iomanip>
//#include <cstring>
using namespace std;
/*
* Using Minecraft to play.
* It's your world.
* If you died,please play it again.
* Let's continue.
*/
int main(){
	int s , x , start , over , c , d;
	double speed=7 , place=0;
	cin >> s >> x;
	start = s - x;
	over = s + x;
	while(true){
		if(place >= start){
			c = speed + speed * 0.98;
			if(c >= over - start){
				cout << "n";
				break;
			}else{
				cout << "y";
				break;
			}
		}
		place += speed;
		speed *= 0.98;
	}
	return 0;
}
2022/1/28 12:23
加载中...