{"problem":{"name":"[信息与未来 2025] 幸运数字","description":{"content":"如果一个 $n$ 位正整数恰好由数字 $0, 1, 2, \\cdots , n - 1$ 组成，Dr. X 就称它为“幸运数字”，例如： - $1023$ 是一个幸运数字，因为它是一个四位数，且恰好由数字 $0, 1, 2, 3$ 组成。 - $123$ 不是幸运数字，因为三位幸运数字应该由数字 $0, 1, 2$ 组成。 - $012$ 不是幸运数字，因为我们只考虑不含前导零的正整数。 现在","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P1"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGB4348"},"statements":[{"statement_type":"Markdown","content":"如果一个 $n$ 位正整数恰好由数字 $0, 1, 2, \\cdots , n - 1$ 组成，Dr. X 就称它为“幸运数字”，例如：\n\n- $1023$ 是一个幸运数字，因为它是一个四位数，且恰好由数字 $0, 1, 2, 3$ 组成。\n- $123$ 不是幸运数字，因为三位幸运数字应该由数字 $0, 1, 2$ 组成。\n- $012$ 不是幸运数字，因为我们只考虑不含前导零的正整数。\n\n现在，给定两个正整数 $a$ 和 $b$，请你计算 $a, a + 1, a + 2, \\cdots, b$ 中幸运数字的数量。\n\n## Input\n\n输入两个空格分隔的正整数 $a$ 和 $b$。\n\n## Output\n\n输出一个整数，表示 $a, a + 1, a + 2, \\cdots, b$ 中幸运数字的数量。\n\n[samples]\n\n## Note\n\n### 样例 $\\textbf 1$ 解释\n在 $4$ 和 $202$ 之间，幸运数字有 $10, 102, 120, 201$。\n### 数据范围\n对于 $100\\%$ 的数据，满足 $1 ≤ a ≤ b ≤ 10^6$。","is_translate":false,"language":"English"}],"meta":{"iden":"LGB4348","tags":["2025","江苏","枚举","信息与未来"],"sample_group":[["4 202","4"],["1 100000","119"]],"created_at":"2026-03-03 11:09:25"}}