{"problem":{"name":"[信息与未来 2014] 连续非素数子序列的最大长度","description":{"content":"给出一个正整数 $n$，求在数列 $\\{2,3,\\cdots,n\\}$ 中，连续非素数子序列的最大长度。","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P2"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGB4130"},"statements":[{"statement_type":"Markdown","content":"给出一个正整数 $n$，求在数列 $\\{2,3,\\cdots,n\\}$\n中，连续非素数子序列的最大长度。\n\n## Input\n\n一个整数 $n$。\n\n## Output\n\n一个整数，表示连续非素数子序列的最大长度。\n\n[samples]\n\n## Note\n\n### 样例 $\\textbf1$ 解释\n| 连续非素数子序列 | 长度 |\n| :----------: | :----------: |\n| $\\{4\\}$ | $1$ |\n| $\\{6\\}$ | $1$ |\n| $\\{8,9,10\\}$ | $3$ |\n| $\\{12\\}$ | $1$ |\n\n其中，最大长度为 $3$，即有连续的 $3$ 个非素数。\n### 数据范围\n$2\\le n\\le 5\\times10^6$。","is_translate":false,"language":"English"}],"meta":{"iden":"LGB4130","tags":["2014","江苏","枚举","素数判断,质数,筛法","信息与未来"],"sample_group":[["12","3"],["30","5"]],"created_at":"2026-03-03 11:09:25"}}