[GESP202506 一级] 值日

Luogu
IDLGB4355
Time1000ms
Memory512MB
DifficultyP1
2025循环结构GESP
小杨和小红是值日生,负责打扫教室。小杨每 $m$ 天值日一次,小红每 $n$ 天值日一次。今天他们两个一起值日,请问至少多少天后,他们会再次同一天值日? ## Input 第一行,一个正整数 $m$,表示小杨的值日周期; 第二行,一个正整数 $n$,表示小红的值日周期。 ## Output 一行,一个整数,表示至少多少天后他们会再次同一天值日。 [samples] ## Background 对应的选择、判断题:<https://ti.luogu.com.cn/problemset/1181> ## Note 对于所有测试点,保证 $1 \leq m, n \leq 100$。
Samples
Input #1
4
6
Output #1
12
API Response (JSON)
{
  "problem": {
    "name": "[GESP202506 一级] 值日",
    "description": {
      "content": "小杨和小红是值日生,负责打扫教室。小杨每 $m$ 天值日一次,小红每 $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": "LGB4355"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "小杨和小红是值日生,负责打扫教室。小杨每 $m$ 天值日一次,小红每 $n$ 天值日一次。今天他们两个一起值日,请问至少多少天后,他们会再次同一天值日?\n\n## Input\n\n第一行,一个正整数 $m$,表示小杨的值日周期;\n\n第二行,一个正整数 $n$,表示小红的值日周期。\n\n## Output\n\n一行,一个整数,表示至少多少天后他们会再次同一天值日。\n\n[samples]\n\n## Backgr...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments