强烈要求加强数据
查看原帖
强烈要求加强数据
1401911
ridewind2013楼主2024/11/10 07:38

这题测试点太水了,样例都没过,莫名其妙就AC了。

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	int cnt=0;
	while(n>0){
		n-=(int)(sqrt(n))*(int)(sqrt(n));
		cnt++;
	} 
	cout<<cnt;
	return 0;
}

样例输出2,我的代码输出3

2024/11/10 07:38
加载中...