013. Resistors in Parallel

Codeforces
IDCF10269013
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
When two resistors with resistances _a_ and _b_ are parallel in an electronic circuit, their equivalent resistance is calculated as (_a_ * _b_) / (_a_ + _b_). Given the resistances of two resistors, calculate their equivalent resistance. The first line of input contains a single positive integer _a_: the resistance of the first resistor. The second line of input contains a single positive integer _b_: the resistance of the second resistor. Output a single positive decimal number _r_: the equivalent resistance of the two resistors, calculated using the above formula. ## Input The first line of input contains a single positive integer _a_: the resistance of the first resistor. The second line of input contains a single positive integer _b_: the resistance of the second resistor. ## Output Output a single positive decimal number _r_: the equivalent resistance of the two resistors, calculated using the above formula. [samples]
**Definitions** Let $ a, b \in \mathbb{R}^+ $ denote the resistances of two resistors. **Objective** Compute the equivalent resistance $ r $ when connected in parallel: $$ r = \frac{a \cdot b}{a + b} $$
API Response (JSON)
{
  "problem": {
    "name": "013. Resistors in Parallel",
    "description": {
      "content": "When two resistors with resistances _a_ and _b_ are parallel in an electronic circuit, their equivalent resistance is calculated as (_a_ * _b_) / (_a_ + _b_). Given the resistances of two resistors, c",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269013"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "When two resistors with resistances _a_ and _b_ are parallel in an electronic circuit, their equivalent resistance is calculated as (_a_ * _b_) / (_a_ + _b_). Given the resistances of two resistors, c...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ a, b \\in \\mathbb{R}^+ $ denote the resistances of two resistors.\n\n**Objective**  \nCompute the equivalent resistance $ r $ when connected in parallel:  \n$$\nr = \\frac{a \\cdot b}{...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments