{"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\u003ci\u003eSekiro: Shadows Die Twice\u003c/i\u003e is an action-adventure video game developed by FromSoftware and published by Activision. In the game, the players act as a Sengoku period shinobi known as Wolf as he attempts to take revenge on a samurai clan who attacked him and kidnapped his lord.\u003c/p\u003e\n\n\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/be8d4b4d04fc5c21e32cb5def4fc408b?v\u003d1726179809\"\u003e\u003c/center\u003e\n\n\u003cp\u003eAs a game directed by Hidetaka Miyazaki, Sekiro (unsurprisingly) features a very harsh death punishment. If the player dies when carrying $g$ amount of money, the amount of money will be reduced to $\\left\\lceil \\frac{g}{2} \\right\\rceil$, where $\\left\\lceil \\frac{g}{2} \\right\\rceil$ indicates the smallest integer $g\u0027$ that $2g\u0027 \\ge g$.\u003c/p\u003e\n\n\u003cp\u003eAs a noobie of the game, BaoBao has died $k$ times in the game continuously. Given that BaoBao carried $n$ amount of money before his first death, and that BaoBao didn\u0027t collect or spend any money during these $k$ deaths, what\u0027s the amount of money left after his $k$ deaths?\u003c/p\u003e\n\n\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003eThere are multiple test cases. The first line of the input contains an integer $T$ (about $10^3$), indicating the number of test cases. For each test case:\u003c/p\u003e\n\n\u003cp\u003eThe first and only line contains two integers $n$ and $k$ ($0 \\le n \\le 10^9$, $1 \\le k \\le 10^9$), indicating the initial amount of money BaoBao carries and the number of times BaoBao dies in the game.\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003eFor each test case output one line containing one integer, indicating the amount of money left after $k$ deaths.\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\u003e4\n10 1\n7 1\n10 2\n7 2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e5\n4\n3\n2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n\n\u003ch4\u003eHint\u003c/h4\u003e\n\u003cp\u003eFor the third sample test case, when BaoBao dies for the first time, the money he carries will be reduced from 10 to 5; When he dies for the second time, the money he carries will be reduced from 5 to 3.\u003c/p\u003e\n"}}]}