{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"MD","content":"给你一个整数数组 $a_1, a_2, \\ldots, a_n$。\n\n如果从数组 $a$ 中移除一些元素得到数组 $b$ ,那么 $b$ 被称作 $a$ 的子序列.\n\n数组 $b_1,b_2,\\ldots ,b_k$ 被称作好数组,当且仅当它是非空的,而且对于每个 $i (1 \\leqslant i \\leqslant k) ,b_i$ 都可以被 $i$ 整除。\n\n请求出 $a$ 数组的所有子序列中好数组的个数,答案模 $10^9+7$。\n\n我们称两个子序列不同,当且仅当它们在 $a$ 数组中选取元素的下标集合不同,即与元素值无关。具体说来,数组 $a$ 有 $2^n-1$ 个不同的子序列(除去空集)。"}},{"title":"Input","value":{"format":"MD","content":"第一行包含一个整数 $n$($1 \\le n \\le 100\\,000$) ,表示 $a$ 的长度。\n\n第二行包含 $n$ 个整数,分别为 $a_1, a_2, \\ldots, a_n$ ($1 \\le a_i \\le 10^6$)"}},{"title":"Output","value":{"format":"MD","content":"输出一个整数,表示 $a$ 数组所有子序列中好数组的个数模 $10^9+7$ 的结果。"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Sample 2","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n2 2 1 22 14\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e13\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"MD","content":"在第一个例子中,三个非空的子序列全是好数组:\\{1\\}, \\{1, 2\\}, \\{2\\}\n\n在第二个例子中,是好数组的子序列是: \\{2\\}, \\{2, 2\\}, \\{2, 22\\}, \\{2, 14\\}, \\{2\\}, \\{2, 22\\}, \\{2, 14\\},\\{1\\},\\{1, 22\\},\\{1, 14\\},\\{22\\},\\{22, 14\\},\\{14\\}\n注意,有一些子序列被列出来多于一次,因为它们在原数组中出现多次"}}]}