[GESP202403 一级] 找因数

Luogu
IDLGB3953
Time1000ms
Memory512MB
DifficultyP1
2024循环结构GESP
小 A 最近刚刚学习了因数的概念,具体来说,如果一个正整数 $a$ 可以被另一个正整数 $b$ 整除,那么我们就说 $b$ 是 $a$ 的因数。 请你帮忙写一个程序,从小到大输出正整数 $a$ 的所有因数。 ## Input 输入一行一个正整数 $a$。保证 $a\leq1000$。 ## Output 输出若干行,为 $a$ 的所有约数,从小到大排序。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1141>
Samples
Input #1
1
Output #1
1
Input #2
6
Output #2
1
2
3
6
Input #3
10
Output #3
1
2
5
10
API Response (JSON)
{
  "problem": {
    "name": "[GESP202403 一级] 找因数",
    "description": {
      "content": "小 A 最近刚刚学习了因数的概念,具体来说,如果一个正整数 $a$ 可以被另一个正整数 $b$ 整除,那么我们就说 $b$ 是 $a$ 的因数。 请你帮忙写一个程序,从小到大输出正整数 $a$ 的所有因数。",
      "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": "LGB3953"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小 A 最近刚刚学习了因数的概念,具体来说,如果一个正整数 $a$ 可以被另一个正整数 $b$ 整除,那么我们就说 $b$ 是 $a$ 的因数。\n\n请你帮忙写一个程序,从小到大输出正整数 $a$ 的所有因数。\n\n## Input\n\n输入一行一个正整数 $a$。保证 $a\\leq1000$。\n\n## Output\n\n输出若干行,为 $a$ 的所有约数,从小到大排序。\n\n[samples]\n\n## B...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments