{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"已知一个n元高次方程:\r\u003cbr\u003e\u003cimg src\u003d\"CDN_BASE_URL/14b190da52aea171a65d889a60800219?v\u003d1714808270\"\u003e\r\u003cbr\u003e其中:x1, x2,...,xn是未知数,k1,k2,...,kn是系数,p1,p2,...pn是指数。且方程中的所有数均为整数。\r\u003cbr\u003e假设未知数1 \u0026lt;\u003d xi \u0026lt;\u003d M, i\u003d1,,,n,求这个方程的整数解的个数。\r\u003cbr\u003e1 \u0026lt;\u003d n \u0026lt;\u003d 6;1 \u0026lt;\u003d M \u0026lt;\u003d 150。\r\u003cbr\u003e\u003cimg src\u003d\"CDN_BASE_URL/db6996e48f80e40cb3b2c7966edc0f19?v\u003d1714808270\"\u003e\r\u003cbr\u003e方程的整数解的个数小于2\u003csup\u003e31\u003c/sup\u003e。\r\u003cbr\u003e★本题中,指数Pi(i\u003d1,2,...,n)均为正整数。\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"第1行包含一个整数n。第2行包含一个整数M。第3行到第n+2行,每行包含两个整数,分别表示ki和pi。两个整数之间用一个空格隔开。第3行的数据对应i\u003d1,第n+2行的数据对应i\u003dn。"}},{"title":"Output","value":{"format":"HTML","content":"仅一行,包含一个整数,表示方程的整数解的个数。"}},{"title":"Sample","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\n150\r\n1 2\r\n-1 2\r\n1 2\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e178\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}