lkjdsalkj;sadusaioasdjoihsfadjoihhkusduhjds

AAA马舍予批发部  •  2天前


#include <iostream>
#include <cmath>
using namespace std;

int main() {
	int n, z, big;
	bool tag = false;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> z;
		if (sqrt(z) == int(sqrt(z))) {
			tag = true;
			big = max(z, big);
		}

	}
	if (tag = true) {
		cout << (sqrt(big));
	} else {
		cout << "Not found";
	}

}


评论:

请先登录,才能进行评论