测试点3过不去,蒟蒻求助!!!
查看原帖
测试点3过不去,蒟蒻求助!!!
389372
JL_Lee楼主2021/1/22 18:34

这是源代码,求救!!!

#include <iostream>
using namespace std;
int main (){
	int s,x;
	double sw=0;
	cin>>s>>x;
	if(sw>=s-x&&sw+7<=s+4){
		cout<<"y";
		return 0;
	}else{
		sw=7;
	}
	while(sw<=s-x){
		sw+=sw*98/100;
	}
	sw+=sw*98/100;
	if(sw>s+x){
		cout<<"n";
	}else{
		cout<<"y";
	}
	return 0;
} 

不知道为啥过不去???

2021/1/22 18:34
加载中...