与 7 无关的数

Luogu
IDLGB2081
Time1000ms
Memory128MB
DifficultyP1
循环结构
一个正整数,如果它能被 $7$ 整除,或者它的十进制表示法中某一位上的数字为 $7$,则称其为与 $7$ 相关的数。现求所有小于等于 $n(n<100)$ 与 $7$ 无关的正整数的平方和。 ## Input 输入为一行,正整数 $n(n<100)$。 ## Output 输出一行,包含一个整数,即小于等于 $n$ 的所有与 $7$ 无关的正整数的平方和。 [samples]
Samples
Input #1
21
Output #1
2336
API Response (JSON)
{
  "problem": {
    "name": "与 7 无关的数",
    "description": {
      "content": "一个正整数,如果它能被 $7$ 整除,或者它的十进制表示法中某一位上的数字为 $7$,则称其为与 $7$ 相关的数。现求所有小于等于 $n(n<100)$ 与 $7$ 无关的正整数的平方和。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2081"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "一个正整数,如果它能被 $7$ 整除,或者它的十进制表示法中某一位上的数字为 $7$,则称其为与 $7$ 相关的数。现求所有小于等于 $n(n<100)$ 与 $7$ 无关的正整数的平方和。\n\n## Input\n\n输入为一行,正整数 $n(n<100)$。\n\n## Output\n\n输出一行,包含一个整数,即小于等于 $n$ 的所有与 $7$ 无关的正整数的平方和。\n\n[samples]...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments