C. Extraordinarily Nice Numbers

Codeforces
IDCF72C
Time2000ms
Memory256MB
Difficulty
math
English · Original
Chinese · Translation
Formal · Original
The positive integer _a_ is a divisor of the positive integer _b_ if and only if there exists a positive integer _c_ such that _a_ × _c_ = _b_. King Astyages thinks a positive integer _x_ is extraordinarily nice if the number of its even divisors is equal to the number of its odd divisors. For example 3 has two positive divisors 3 and 1, both of which are odd, so 3 is not extraordinarily nice. On the other hand 2 is only divisible by 2 and 1, so it has one odd and one even divisor. Therefore 2 is extraordinarily nice. Given a positive integer _x_ determine whether it's extraordinarily nice. ## Input The input contains only a single integer _x_ (1 ≤ _x_ ≤ 103). ## Output Write a single _yes_ or _no_. Write _yes_ if the number is extraordinarily nice and _no_ otherwise. You don't need to care about capital or small letters. The output is case-insensitive. [samples]
正整数 #cf_span[a] 是正整数 #cf_span[b] 的因数,当且仅当存在一个正整数 #cf_span[c] 使得 #cf_span[a × c = b]。 国王 Astyages 认为一个正整数 #cf_span[x] 是 #cf_span(class=[tex-font-style-underline], body=[extraordinarily nice]) 的,当且仅当它的偶因数个数等于它的奇因数个数。 例如,#cf_span[3] 有两个正因数 #cf_span[3] 和 #cf_span[1],它们都是奇数,因此 #cf_span[3] 不是 extraordinarily nice。另一方面,#cf_span[2] 仅能被 #cf_span[2] 和 #cf_span[1] 整除,因此它有一个奇因数和一个偶因数。所以 #cf_span[2] 是 extraordinarily nice。 给定一个正整数 #cf_span[x],判断它是否是 extraordinarily nice。 输入仅包含一个整数 #cf_span[x](#cf_span[1 ≤ x ≤ 103])。 请输出一个 _yes_ 或 _no_。如果该数是 extraordinarily nice,则输出 _yes_,否则输出 _no_。 你无需关心字母的大小写,输出不区分大小写。 ## Input 输入仅包含一个整数 #cf_span[x](#cf_span[1 ≤ x ≤ 103])。 ## Output 请输出一个 _yes_ 或 _no_。如果该数是 extraordinarily nice,则输出 _yes_,否则输出 _no_。你无需关心字母的大小写,输出不区分大小写。 [samples]
**Definitions** Let $ x \in \mathbb{Z}^+ $. Let $ D(x) $ denote the set of positive divisors of $ x $. Let $ D_{\text{even}}(x) = \{ d \in D(x) \mid d \text{ is even} \} $, and $ D_{\text{odd}}(x) = \{ d \in D(x) \mid d \text{ is odd} \} $. **Constraints** $ 1 \le x \le 10^3 $ **Objective** Determine whether $ |D_{\text{even}}(x)| = |D_{\text{odd}}(x)| $. Output "yes" if true, "no" otherwise.
Samples
Input #1
2
Output #1
yes
Input #2
3
Output #2
no
API Response (JSON)
{
  "problem": {
    "name": "C. Extraordinarily Nice Numbers",
    "description": {
      "content": "The positive integer _a_ is a divisor of the positive integer _b_ if and only if there exists a positive integer _c_ such that _a_ × _c_ = _b_. King Astyages thinks a positive integer _x_ is extraord",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF72C"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "The positive integer _a_ is a divisor of the positive integer _b_ if and only if there exists a positive integer _c_ such that _a_ × _c_ = _b_.\n\nKing Astyages thinks a positive integer _x_ is extraord...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "正整数 #cf_span[a] 是正整数 #cf_span[b] 的因数,当且仅当存在一个正整数 #cf_span[c] 使得 #cf_span[a × c = b]。\n\n国王 Astyages 认为一个正整数 #cf_span[x] 是 #cf_span(class=[tex-font-style-underline], body=[extraordinarily nice]) 的,当且仅当它的...",
      "is_translate": true,
      "language": "Chinese"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ x \\in \\mathbb{Z}^+ $.  \nLet $ D(x) $ denote the set of positive divisors of $ x $.  \nLet $ D_{\\text{even}}(x) = \\{ d \\in D(x) \\mid d \\text{ is even} \\} $,  \nand $ D_{\\text{odd}...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments