182. Lucky Numbers

Codeforces
IDCF10269182
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
You consider a number to be "lucky" if it has any digits equal to 7. For example, 7377, 87, and 98789 are lucky, while 6, 300, and 561 are not lucky. Given a number, figure out whether or not it is a lucky number. The only line of input consists of a single integer $n$. If $n$ is a lucky number, output "YES" (no quotes). Otherwise, output "NO" (no quotes). ## Input The only line of input consists of a single integer $n$. ## Output If $n$ is a lucky number, output "YES" (no quotes). Otherwise, output "NO" (no quotes). [samples]
**Definitions** Let $ n \in \mathbb{Z} $ be the input integer. **Constraints** $ n \in \mathbb{Z} $, with no explicit bounds given. **Objective** Determine whether the decimal representation of $ n $ contains at least one digit equal to $ 7 $. Define: $$ \text{Lucky}(n) = \begin{cases} \text{YES} & \text{if } \exists d \in \text{digits}(n) \text{ such that } d = 7 \\ \text{NO} & \text{otherwise} \end{cases} $$
API Response (JSON)
{
  "problem": {
    "name": "182. Lucky Numbers",
    "description": {
      "content": "You consider a number to be \"lucky\" if it has any digits equal to 7. For example, 7377, 87, and 98789 are lucky, while 6, 300, and 561 are not lucky. Given a number, figure out whether or not it is a ",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10269182"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You consider a number to be \"lucky\" if it has any digits equal to 7. For example, 7377, 87, and 98789 are lucky, while 6, 300, and 561 are not lucky. Given a number, figure out whether or not it is a ...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ n \\in \\mathbb{Z} $ be the input integer.\n\n**Constraints**  \n$ n \\in \\mathbb{Z} $, with no explicit bounds given.\n\n**Objective**  \nDetermine whether the decimal representation o...",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments