{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e h1,h2,h3,h4,h5,h6 { margin-bottom:0; } div.textBG p { margin: 0 0 0.0001pt; }\u003c/style\u003e\u003cspan style\u003d\u0027float:right\u0027\u003e \u003ca target\u003d\u0027_blank\u0027 href\u003d\u0027CDN_BASE_URL/1ed27be10fdeb55307b160993d59dd87?v\u003d1544917036\u0027\u003e \u003cimg width\u003d\u0027100\u0027 height\u003d\u002726\u0027 border\u003d\u00270\u0027 title\u003d\u0027Download as PDF\u0027 alt\u003d\u0027Download as PDF\u0027 src\u003d\u0027https://uva.onlinejudge.org/components/com_onlinejudge/images/button_pdf.png\u0027\u003e \u003c/a\u003e\u003c/span\u003e\u003cdiv style\u003d\u0027clear:both\u0027\u003e\u003c/div\u003e\u003ciframe src\u003d\"CDN_BASE_URL/1ed27be10fdeb55307b160993d59dd87?v\u003d1544917036\" style\u003d\"width:100%; height:700px;\" frameborder\u003d\"0\"\u003e\u003c/iframe\u003e\n\u003cb\u003e题目描述\u003c/b\u003e\u003c/br\u003e\n给出n个整数,从中选出1个或者多个,使得选出的整数乘积是完全平方数。一共有多少种选法?比如{4,6,10,15}有3种选法:{4},{6,10,15},{4,6,10,15}\u003c/br\u003e\n\u003cb\u003e输入格式\u003c/b\u003e\u003c/br\u003e\n输入第一行为一个整数T( 1 ≤T≤30)测试数据组数。每组数据包含两行,第一行为整数n(1≤n≤100).第二行包含n个整数。所有整数均不小于1,不大于10\u003csup\u003e15\u003c/sup\u003e,并且不含大于500的素因子。\u003c/br\u003e\n\u003cb\u003e输出格式\u003c/b\u003e\u003c/br\u003e\n对于每组数据,输出方案总数。数据保证答案总数不超过带符号64位整数的范围。\u003c/br\u003e\n\u003cb\u003e样例输入\u003c/b\u003e\u003c/br\u003e\n\u003cpre\u003e4\n3\n2 3 5\n3\n6 10 15\n4\n4 6 10 15\n3\n2 2 2\u003c/pre\u003e\n\u003cb\u003e样例输出\u003c/b\u003e\u003c/br\u003e\n\u003cpre\u003e\n0\n1\n3\n3\n\u003c/pre\u003e\n\n\n"}}]}