{"problem":{"name":"A. Perfect Squares","description":{"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. A number _x_ is said to be a perfect square if there exists an integer _y_ s","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF914A"},"statements":[{"statement_type":"Markdown","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.\n\n## Input\n\nThe 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.\n\n## Output\n\nPrint the largest number in the array which is not a perfect square. It is guaranteed that an answer always exists.\n\n[samples]\n\n## Note\n\nIn the first sample case, 4 is a perfect square, so the largest number in the array that is not a perfect square is 2.","is_translate":false,"language":"English"},{"statement_type":"Markdown","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## Input\n\n第一行包含一个整数 $n$ ($1 ≤ n ≤ 1000$) —— 数组中元素的个数。第二行包含 $n$ 个整数 $a_1, a_2, ..., a_n$ ($-10^6 ≤ a_i ≤ 10^6$) —— 数组的元素。保证数组中至少有一个元素不是完全平方数。\n\n## Output\n\n请输出数组中最大的不是完全平方数的数。保证答案一定存在。\n\n[samples]\n\n## Note\n\n在第一个样例中，$4$ 是一个完全平方数，因此数组中最大的不是完全平方数的数是 $2$。","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"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$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF914A","tags":["brute force","implementation","math"],"sample_group":[["2\n4 2","2"],["8\n1 2 4 8 16 32 64 576","32"]],"created_at":"2026-03-03 11:00:39"}}