[GESP202312 一级] 小杨报数

Luogu
IDLGB3922
Time1000ms
Memory512MB
DifficultyP1
2023循环结构GESP
小杨需要从 $1$ 到 $N$ 报数。在报数过程中,小杨希望跳过 $M$ 的倍数。例如,如果 $N=5$, $M=2$ ,那么小杨就需要依次报出 $1$、$3$、$5$。 现在,请你依次输出小杨报的数。 ## Input 输入 $2$ 行,第一行一个整数 $N(1 \le N \le 1,000)$;第二行一个整数 $M(2 \le M \le 100)$。 ## Output 输出若干行,依次表示小杨报的数。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1133>
Samples
Input #1
5
2
Output #1
1
3
5
Input #2
10
3
Output #2
1
2
4
5
7
8
10
API Response (JSON)
{
  "problem": {
    "name": "[GESP202312 一级] 小杨报数",
    "description": {
      "content": "小杨需要从 $1$ 到 $N$ 报数。在报数过程中,小杨希望跳过 $M$ 的倍数。例如,如果 $N=5$, $M=2$ ,那么小杨就需要依次报出 $1$、$3$、$5$。 现在,请你依次输出小杨报的数。",
      "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": "LGB3922"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小杨需要从 $1$ 到 $N$ 报数。在报数过程中,小杨希望跳过 $M$ 的倍数。例如,如果 $N=5$, $M=2$ ,那么小杨就需要依次报出 $1$、$3$、$5$。\n\n现在,请你依次输出小杨报的数。\n\n## Input\n\n输入 $2$ 行,第一行一个整数 $N(1 \\le N \\le 1,000)$;第二行一个整数 $M(2 \\le M \\le 100)$。\n\n## Output\n\n输出若干...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments