[GESP202412 一级] 奇数和偶数

Luogu
IDLGB4063
Time1000ms
Memory512MB
DifficultyP1
2024GESP
小杨有 $n$ 个正整数,他想知道其中的奇数有多少个,偶数有多少个。 ## Input 第一行包含一个正整数 $n$,代表正整数个数。 之后 $n$ 行,每行包含一个正整数。 ## Output 输出两个正整数(英文空格间隔),代表奇数的个数和偶数的个数。如奇数或偶数的个数为 $0$,则对应输出 $0$。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1165> ## Note 对于全部数据,保证有 $1\leq n\leq 10^5$ 且正整数不超过 $10^5$。
Samples
Input #1
5
1
2
3
4
5
Output #1
3 2
API Response (JSON)
{
  "problem": {
    "name": "[GESP202412 一级] 奇数和偶数",
    "description": {
      "content": "小杨有 $n$ 个正整数,他想知道其中的奇数有多少个,偶数有多少个。 ",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 524288
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB4063"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小杨有 $n$ 个正整数,他想知道其中的奇数有多少个,偶数有多少个。\n\n## Input\n\n第一行包含一个正整数 $n$,代表正整数个数。\n\n之后 $n$ 行,每行包含一个正整数。\n\n## Output\n\n输出两个正整数(英文空格间隔),代表奇数的个数和偶数的个数。如奇数或偶数的个数为 $0$,则对应输出 $0$。\n\n[samples]\n\n## Background\n\n对应的选择、判断题:<htt...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments