{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"It is Eid-ul-Azha, and it is mandatory for you to accept your cousin\u0027s challenge in the chess game. While playing a match, an exciting problem starts buzzing in your head.\n\nRook pieces (Nouka in Bangla) go horizontally \u0026 vertically. In the figure, **R\u003csub\u003e1\u003c/sub\u003e** and **R\u003csub\u003e2\u003c/sub\u003e** are in attacking positions where **R\u003csub\u003e1\u003c/sub\u003e** and **R\u003csub\u003e3\u003c/sub\u003e** are not. **R\u003csub\u003e2\u003c/sub\u003e** and **R\u003csub\u003e3\u003c/sub\u003e** are also in non-attacking positions.\n\n![Rooks](CDN_BASE_URL/7350b47cd445513e32619b7f380f53b2?v\u003d1656484394)\n\nNow, you want to find out in how many ways, you can put **k** rooks in an **n x n** chess board so that, no two of them attack each other. "}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 350)**, denoting the number of test cases.\n\nEach case contains two integers **n (1 \u0026le; n \u0026le; 30)** and **k (0 \u0026le; k \u0026le; n\u003csup\u003e2\u003c/sup\u003e)**."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and total number of ways one can put the given number of rooks on a chessboard of the given size so that no two of them are in attacking positions. You may safely assume that this number will be less than **10\u003csup\u003e17\u003c/sup\u003e**."}},{"title":"Sample","value":{"format":"MD","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\u003e8\n1 1\n2 1\n3 1\n4 1\n4 2\n4 3\n4 4\n4 5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 1\nCase 2: 4\nCase 3: 9\nCase 4: 16\nCase 5: 72\nCase 6: 96\nCase 7: 24\nCase 8: 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}