{"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\"\u003eDZY喜欢对数字进行分区。他想知道是否可能将$n$分割成恰好$k$个不同的正整数的和。\u003cbr\u003e\u003cbr\u003e经过一番思考,他觉得这个问题太简单了。所以他决定最大化这$k$个数的乘积。你能帮帮他吗?\u003cbr\u003e\u003cbr\u003e答案可能很大。请输出它模$10^9+7$的结果。\u003cbr\u003e\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"第一行包含一个$t$,表示测试用例的数量。\u003cbr\u003e\u003cbr\u003e接下来有$t$个测试用例。每个测试用例包含一行两个正整数$n,k$。\u003cbr\u003e\u003cbr\u003e($1\\le t\\le 50, 2\\le n,k \\le 10^9$)\u003cbr\u003e"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,如果不存在这样的分区,请输出$-1$。否则输出最大乘积模$10^9 + 7$的结果。\u003cbr\u003e"}},{"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\u003e4\r\n3 4\r\n3 2\r\n9 3\r\n666666 2\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e-1\r\n2\r\n24\r\n110888111\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"提示","value":{"format":"HTML","content":"\u003cbr\u003e在第一个测试用例中,不存在有效的分区。\u003cbr\u003e在第二个测试用例中,分区为$3\u003d1+2$。答案为$1\\times 2 \u003d 2$。\u003cbr\u003e在第三个测试用例中,分区为$9\u003d2+3+4$。答案为$2\\times 3 \\times 4 \u003d 24$。请注意,$9\u003d3+3+3$不是有效的分区,因为它有重复的数。\u003cbr\u003e在第四个测试用例中,分区为$666666\u003d333332+333334$。答案为$333332\\times 333334\u003d 111110888888$。记得输出它模$10^9 + 7$的结果,即$110888111$。\u003cbr\u003e"}}]}