{"trustable":false,"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":"\u003ca href\u003d\"https://sm.ms/image/B5JY8VxSpkvELTH\" target\u003d\"_blank\"\u003e\u003cimg src\u003d\"https://i.loli.net/2019/10/25/B5JY8VxSpkvELTH.png\" \u003e\u003c/a\u003e"}},{"title":"Input","value":{"format":"HTML","content":"第一行输入组数tt,第二行输入要求的第n项和第一项及第二项的值,"}},{"title":"Output","value":{"format":"HTML","content":"输出第n项,值会很大,我们要取模,这个模数的值为2147493647,否则会爆long long "}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e2\n3 1 2\n4 1 10\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e85\n369\n\n \n \u003ci style\u003d\"font-size:1px\"\u003e \u003c/i\u003e\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cpre\u003e第一个样例, 这个数列的第三项 是 85 85 \u003d 2*1十2十3*3*3*3.\n\n \u003c/pre\u003e"}}]}