Add Sub Mul

AtCoder
IDabc098_a
Time2000ms
Memory256MB
Difficulty
You are given two integers $A$ and $B$. Find the largest value among $A+B$, $A-B$ and $A \times B$. ## Constraints * $-1000 \leq A,B \leq 1000$ * All values in input are integers. ## Input Input is given from Standard Input in the following format: $A$ $B$ [samples]
Samples
Input #1
3 1
Output #1
4

$3+1=4$, $3-1=2$ and $3 \times 1=3$. The largest among them is $4$.
Input #2
4 -2
Output #2
6

The largest is $4 - (-2) = 6$.
Input #3
0 0
Output #3
0
API Response (JSON)
{
  "problem": {
    "name": "Add Sub Mul",
    "description": {
      "content": "You are given two integers $A$ and $B$. Find the largest value among $A+B$, $A-B$ and $A \\times B$.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc098_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given two integers $A$ and $B$. Find the largest value among $A+B$, $A-B$ and $A \\times B$.\n\n## Constraints\n\n*   $-1000 \\leq A,B \\leq 1000$\n*   All values in input are integers.\n\n## Input\n\nInp...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments