{"problem":{"name":"138. Perfect Numbers","description":{"content":"A number is considered a _perfect number_ if and only if the sum of its divisors, except for the number itself, is equal to the original number. For example, 28 is a _perfect number_ because its divis","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269138"},"statements":[{"statement_type":"Markdown","content":"A number is considered a _perfect number_ if and only if the sum of its divisors, except for the number itself, is equal to the original number. For example, 28 is a _perfect number_ because its divisors are $1$, $2$, $4$, $7$, and $14$, and $1$ + $2$ + $4$ + $7$ + $14$ = $28$.\n\nGiven an integer $n$, figure out whether or not it is a perfect number, and what the sum of its divisors (except for $n$) is.\n\nThe only line of input consists of a single integer $n$.\n\nOutput two lines.\n\nOn the first line, output \"PERFECT NUMBER\" (no quotes) if the number is a perfect number, and \"NOT A PERFECT NUMBER\" (no quotes) if the number is not a perfect number. On the second line, output the sum of divisors of the number.\n\nAll numbers used in calculations are guaranteed to fit inside of a Java \"int\" data type.\n\n## Input\n\nThe only line of input consists of a single integer $n$.\n\n## Output\n\nOutput two lines.On the first line, output \"PERFECT NUMBER\" (no quotes) if the number is a perfect number, and \"NOT A PERFECT NUMBER\" (no quotes) if the number is not a perfect number. On the second line, output the sum of divisors of the number.\n\n[samples]\n\n## Note\n\nAll numbers used in calculations are guaranteed to fit inside of a Java \"int\" data type.","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $ be the input integer.  \nLet $ D(n) = \\{ d \\in \\mathbb{Z}^+ \\mid d \\mid n \\text{ and } d < n \\} $ be the set of proper positive divisors of $ n $.  \nLet $ \\sigma(n) = \\sum_{d \\in D(n)} d $ be the sum of the proper divisors of $ n $.\n\n**Constraints**  \n$ 1 \\leq n \\leq 2^{31} - 1 $ (fits in a Java `int`)\n\n**Objective**  \nCompute $ \\sigma(n) $.  \nOutput:  \n- First line: \"PERFECT NUMBER\" if $ \\sigma(n) = n $, otherwise \"NOT A PERFECT NUMBER\".  \n- Second line: $ \\sigma(n) $.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269138","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}