Equivalent Resistance

AtCoder
IDrelay_a
Time2000ms
Memory256MB
Difficulty
In an electric circuit, when two resistors $R_1$ and $R_2$ are connected in parallel, the equivalent resistance $R_3$ can be derived from the following formula: * $\frac{1}{R_1} + \frac{1}{R_2} = \frac{1}{R_3}$ Given $R_1$ and $R_2$, find $R_3$. ## Constraints * $1 \leq R_1, R_2 \leq 100$ * $R_1$ and $R_2$ are integers. ## Input The input is given from Standard Input in the following format: $R_1$ $R_2$ [samples]
Samples
Input #1
2 3
Output #1
1.2000000000
Input #2
100 99
Output #2
49.7487437186
API Response (JSON)
{
  "problem": {
    "name": "Equivalent Resistance",
    "description": {
      "content": "In an electric circuit, when two resistors $R_1$ and $R_2$ are connected in parallel, the equivalent resistance $R_3$ can be derived from the following formula: *   $\\frac{1}{R_1} + \\frac{1}{R_2} = \\",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "relay_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "In an electric circuit, when two resistors $R_1$ and $R_2$ are connected in parallel, the equivalent resistance $R_3$ can be derived from the following formula:\n\n*   $\\frac{1}{R_1} + \\frac{1}{R_2} = \\...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments