超时求助,不知道为什么会超时
查看原帖
超时求助,不知道为什么会超时
680434
shumu楼主2023/9/10 15:30
#include<bits/stdc++.h>
using namespace std;
int main() {
	double s;
	int x;
	int n;
	cin>>s;
	n=2;
	for(int i=0;s>=0;i++) {
		s-=n;
		n*=0.98;
		x+=1;
	}
	cout<<x;
	return 0;
}
2023/9/10 15:30
加载中...