为什么不对啊qwq
查看原帖
为什么不对啊qwq
113097
百因必有AC楼主2020/7/10 15:27

RT

#include<bits/stdc++.h>
using namespace std;
long long int n, x, maxn;
int main() {
	scanf("%lld", &n);
	for (int i = 0; i < n; i++) {
		scanf("%lld", &x);
		if (x > 0 && pow(sqrt(x), 2) != x)maxn = max(x, maxn);
	}
	printf("%lld", maxn);
	return 0;
}
2020/7/10 15:27
加载中...