{"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\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"定义f(n)\u003df(n-1)⋅f(n-2)⋅f(n-3)⋅c\u003csup\u003e2⋅n-6\u003c/sup\u003e (n\u0026ge;4)。\u003cbr\u003e\n给定n,f(1),f(2),f(3)和c,求f(n)对10\u003csup\u003e9\u003c/sup\u003e+7取模的结果。"}},{"title":"Input","value":{"format":"HTML","content":"输入一行五个数n,f(1),f(2),f(3)和c。\u003cbr\u003e\n其中4\u0026le;n\u0026le;10\u003csup\u003e18\u003c/sup\u003e,1\u0026le;f(1),f(2),f(3),c\u0026le;10\u003csup\u003e9\u003c/sup\u003e。"}},{"title":"Output","value":{"format":"HTML","content":"输出f(n)对10\u003csup\u003e9\u003c/sup\u003e+7取模的结果。"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e27230 83472 9488 55320 2081\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e791627460\u003c/pre\u003e"}}]}