{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"Given two integers: **n** and **m** and **n** is divisible by **2m**, you have to first write down the first **n** natural numbers in the following form:\n\n1. At first take first **m** integers and make their sign negative\n2. Then take next **m** integers and make their sign positive\n3. The next **m** integers should have negative signs and continue this procedure until all the **n** integers have been assigned a sign.\n\nFor example, let **n** be **12** and **m** be **3**. Then we have **-1 - 2 - 3** + 4 + 5 + 6 **- 7 - 8 - 9** + 10 + 11 + 12. If **n \u003d 4** and **m \u003d 1**, then we have **-1** +2 **-3** + 4.\n\nNow your task is to find the summation of the numbers considering their signs."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 10000)**, denoting the number of test cases.Each case starts with a line containing two integers: **n** and **m (2 \u0026le; n \u0026le; 10\u003csup\u003e9\u003c/sup\u003e, 1 \u0026le; m)**. And you can assume that **n** is divisible by **2\\*m**."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the summation."}},{"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\u003e2\n12 3\n4 1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 18\nCase 2: 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}