Snack

AtCoder
IDabc148_c
Time2000ms
Memory256MB
Difficulty
Takahashi is organizing a party. At the party, each guest will receive one or more snack pieces. Takahashi predicts that the number of guests at this party will be $A$ or $B$. Find the minimum number of pieces that can be evenly distributed to the guests in both of the cases predicted. We assume that a piece cannot be divided and distributed to multiple guests. ## Constraints * $1 \leq A, B \leq 10^5$ * $A \neq B$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $A$ $B$ [samples]
Samples
Input #1
2 3
Output #1
6

When we have six snack pieces, each guest can take three pieces if we have two guests, and each guest can take two if we have three guests.
Input #2
123 456
Output #2
18696
Input #3
100000 99999
Output #3
9999900000
API Response (JSON)
{
  "problem": {
    "name": "Snack",
    "description": {
      "content": "Takahashi is organizing a party. At the party, each guest will receive one or more snack pieces. Takahashi predicts that the number of guests at this party will be $A$ or $B$. Find the minimum number ",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc148_c"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Takahashi is organizing a party.\nAt the party, each guest will receive one or more snack pieces.\nTakahashi predicts that the number of guests at this party will be $A$ or $B$.\nFind the minimum number ...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments