{"raw_statement":[{"iden":"statement","content":"Given an array _a_1, _a_2, ..., _a__n_ of _n_ integers, find the largest number in the array that is not a perfect square.\n\nA number _x_ is said to be a perfect square if there exists an integer _y_ such that _x_ = _y_2."},{"iden":"input","content":"The first line contains a single integer _n_ (1 ≤ _n_ ≤ 1000) — the number of elements in the array.\n\nThe second line contains _n_ integers _a_1, _a_2, ..., _a__n_ ( - 106 ≤ _a__i_ ≤ 106) — the elements of the array.\n\nIt is guaranteed that at least one element of the array is not a perfect square."},{"iden":"output","content":"Print the largest number in the array which is not a perfect square. It is guaranteed that an answer always exists."},{"iden":"examples","content":"Input\n\n2\n4 2\n\nOutput\n\n2\n\nInput\n\n8\n1 2 4 8 16 32 64 576\n\nOutput\n\n32"},{"iden":"note","content":"In the first sample case, 4 is a perfect square, so the largest number in the array that is not a perfect square is 2."}],"translated_statement":[{"iden":"statement","content":"给定一个包含 $n$ 个整数的数组 $[a_1, a_2, ..., a_n]$，找出其中最大的不是完全平方数的数。\n\n一个数 $x$ 被称为完全平方数，当且仅当存在整数 $y$ 使得 $x = y^2$。\n\n第一行包含一个整数 $n$ ($1 ≤ n ≤ 1000$) —— 数组中元素的个数。\n\n第二行包含 $n$ 个整数 $a_1, a_2, ..., a_n$ ($-10^6 ≤ a_i ≤ 10^6$) —— 数组的元素。\n\n保证数组中至少有一个元素不是完全平方数。\n\n请输出数组中最大的不是完全平方数的数。保证答案一定存在。\n\n在第一个样例中，$4$ 是一个完全平方数，因此数组中最大的不是完全平方数的数是 $2$。\n\n"},{"iden":"input","content":"第一行包含一个整数 $n$ ($1 ≤ n ≤ 1000$) —— 数组中元素的个数。第二行包含 $n$ 个整数 $a_1, a_2, ..., a_n$ ($-10^6 ≤ a_i ≤ 10^6$) —— 数组的元素。保证数组中至少有一个元素不是完全平方数。"},{"iden":"output","content":"请输出数组中最大的不是完全平方数的数。保证答案一定存在。"},{"iden":"examples","content":"输入\n2\n4 2\n输出\n2\n\n输入\n8\n1 2 4 8 16 32 64 576\n输出\n32"},{"iden":"note","content":"在第一个样例中，$4$ 是一个完全平方数，因此数组中最大的不是完全平方数的数是 $2$。"}],"sample_group":[],"show_order":[],"formal_statement":"Let $ A = \\{a_1, a_2, \\dots, a_n\\} \\subseteq \\mathbb{Z} $, with $ 1 \\leq n \\leq 1000 $ and $ -10^6 \\leq a_i \\leq 10^6 $.\n\nDefine the set of perfect squares in $ A $ as:\n$$\nS = \\{ x \\in A \\mid \\exists y \\in \\mathbb{Z},\\ x = y^2 \\}\n$$\n\nLet $ T = A \\setminus S $ be the set of elements in $ A $ that are not perfect squares. It is given that $ T \\neq \\emptyset $.\n\nObjective: Compute\n$$\n\\max(T)\n$$","simple_statement":null,"has_page_source":false}