031. 2001: A Space Odyssey

Codeforces
IDCF10269031
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
While listening to an orchestra fail to play the music from 2001: A Space Odyssey, you wonder what the lowest positive number (other than one) that divides 2001 is. It turns out to be 3 (2001 = 3 * 667). Write a program to find this value for any composite number $n$. The only line of input contains a single positive composite (not prime) integer $n$, greater than one: the number used in your calculations. Output a single positive integer _k_: the smallest positive number (other than one) that divides $n$. ## Input The only line of input contains a single positive composite (not prime) integer $n$, greater than one: the number used in your calculations. ## Output Output a single positive integer _k_: the smallest positive number (other than one) that divides $n$. [samples]
**Definitions** Let $ n \in \mathbb{Z} $ be a composite integer such that $ n > 1 $. **Constraints** $ n $ is composite and $ n > 1 $. **Objective** Find the smallest integer $ k \in \mathbb{Z} $ such that $ k > 1 $ and $ k \mid n $.
API Response (JSON)
{
  "problem": {
    "name": "031. 2001: A Space Odyssey",
    "description": {
      "content": "While listening to an orchestra fail to play the music from 2001: A Space Odyssey, you wonder what the lowest positive number (other than one) that divides 2001 is. It turns out to be 3 (2001 = 3 * 66",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269031"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "While listening to an orchestra fail to play the music from 2001: A Space Odyssey, you wonder what the lowest positive number (other than one) that divides 2001 is. It turns out to be 3 (2001 = 3 * 66...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be a composite integer such that $ n > 1 $.\n\n**Constraints**  \n$ n $ is composite and $ n > 1 $.\n\n**Objective**  \nFind the smallest integer $ k \\in \\mathbb{Z...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments