017. Chem Lab: Cross the Charges

Codeforces
IDCF10269017
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
While preparing for Chemistry Lab in Science Olympiad, you are taught to "cross your charges" when calculating the molecular coefficients given the charges: using the charges of two bonded ions, you swap the two values to obtain the molecular coefficients. For example, a molecule made of two ions with charges of 4 and 3 would have coefficients of 3 and 4, respectively. The only line of input contains two space-separated integers _a_ and _b_ representing the charges of _a_ and _b_, respectively. Output two space-separated integers _c_ and _d_: the coefficients of each ion given their charges. These can be calculated by swapping _a_ and _b_ (crossing the charges). ## Input The only line of input contains two space-separated integers _a_ and _b_ representing the charges of _a_ and _b_, respectively. ## Output Output two space-separated integers _c_ and _d_: the coefficients of each ion given their charges. These can be calculated by swapping _a_ and _b_ (crossing the charges). [samples]
**Definitions** Let $ a, b \in \mathbb{Z} $ be the charges of two ions. **Objective** Compute $ c = b $, $ d = a $.
API Response (JSON)
{
  "problem": {
    "name": "017. Chem Lab: Cross the Charges",
    "description": {
      "content": "While preparing for Chemistry Lab in Science Olympiad, you are taught to \"cross your charges\" when calculating the molecular coefficients given the charges: using the charges of two bonded ions, you s",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269017"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "While preparing for Chemistry Lab in Science Olympiad, you are taught to \"cross your charges\" when calculating the molecular coefficients given the charges: using the charges of two bonded ions, you s...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ a, b \\in \\mathbb{Z} $ be the charges of two ions.\n\n**Objective**  \nCompute $ c = b $, $ d = a $....",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments