{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\nEdward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his friends. What\u0027s more, he bought a large decorative chessboard with \u003cvar\u003eN\u003c/var\u003e rows and \u003cvar\u003eM\u003c/var\u003e columns.\n\u003c/p\u003e\n\n\u003cp\u003e\nEvery day after work, Edward will place a chess piece on a random empty cell. A few days later, he found the chessboard was \u003cem\u003edominated\u003c/em\u003e by the chess pieces. That means there is at least one chess piece in every row. Also, there is at least one chess piece in every column.\n\u003c/p\u003e\n\n\u003cp\u003e\n\"That\u0027s interesting!\" Edward said. He wants to know the expectation number of days to make an empty chessboard of \u003cvar\u003eN\u003c/var\u003e × \u003cvar\u003eM\u003c/var\u003e dominated. Please write a program to help him.\n\u003c/p\u003e\n\n\u003ch4\u003eInput\u003c/h4\u003e\n\n\u003cp\u003eThere are multiple test cases. The first line of input contains an integer \u003cvar\u003eT\u003c/var\u003e indicating the number of test cases. For each test case:\u003c/p\u003e\n\n\u003cp\u003e\nThere are only two integers \u003cvar\u003eN\u003c/var\u003e and \u003cvar\u003eM\u003c/var\u003e (1 \u0026lt;\u003d \u003cvar\u003eN\u003c/var\u003e, \u003cvar\u003eM\u003c/var\u003e \u0026lt;\u003d 50).\n\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\n\u003cp\u003e\nFor each test case, output the expectation number of days.\n\u003c/p\u003e\n\n\u003cp\u003e\nAny solution with a relative or absolute error of at most 10\u003csup\u003e-8\u003c/sup\u003e will be accepted.\n\u003c/p\u003e\n\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\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\u003e2\n1 3\n2 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e3.000000000000\n2.666666666667\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n"}}]}