{"trustable":true,"prependHtml":"\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 async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e有一个数组是按照以下规则生成的。\u003cbr\u003e$h_0\u003d2,h_1\u003d3,h_2\u003d6,h_n\u003d4h_{n-1}+17h_{n-2}-12h_{n-3}-16$\u003cbr\u003e让我们定义两个数组 ${b_n} and {a_n}$ 如下。\u003cbr\u003e$b_n\u003d3h_{n+1} h_n+9h_{n+1} h_{n-1}+9h_n^2+27h_n h_{n-1}-18h_{n+1}-126h_n-81h_{n-1}+192(n\u0026gt;0)$\u003cbr\u003e$a_n\u003db_n+4^n$\u003cbr\u003e现在,你需要打印 $\\left \\lfloor √(a_n ) \\right \\rfloor $ ,其中 n\u0026gt;1。\u003cbr\u003e你的答案可能非常大,所以请对答案取模 1000000007 后输出。\u003cbr\u003e\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"输入的第一行包含一个整数 T (1 \u0026lt;\u003d T \u0026lt;\u003d 1000),表示测试用例的数量。\u003cbr\u003e每个测试用例在单独的一行包含一个整数 n (1 \u0026lt; n \u0026lt;\u003d $10^{15}$)。\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,输出 \u0026amp;#8970;√(a_n )\u0026amp;#8971; 模 1000000007 的结果。"}},{"title":"样例","value":{"format":"HTML","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\u003e3\r\n4\r\n7\r\n9\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1255\r\n324725\r\n13185773\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}