{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"You are given two integers: **n** and **k**, your task is to find the most significant three digits, and least significant three digits of **n\u003csup\u003ek\u003c/sup\u003e**."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026le; 1000)**, denoting the number of test cases.\n\nEach case starts with a line containing two integers: **n (2 \u0026le; n \u0026lt; 2\u003csup\u003e31\u003c/sup\u003e)** and **k (1 \u0026le; k \u0026le; 10\u003csup\u003e7\u003c/sup\u003e)**."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the three leading digits (most significant) and three trailing digits (least significant). You can assume that the input is given such that **n\u003csup\u003ek\u003c/sup\u003e** contains at least six digits."}},{"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\u003e5\n123456 1\n123456 2\n2 31\n2 32\n29 8751919\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 123 456\nCase 2: 152 936\nCase 3: 214 648\nCase 4: 429 296\nCase 5: 665 669\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}