{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e\n Tina Town is a friendly place. People there care about each other.\u003cbr\u003e\u003cbr\u003e\n Tina has a ball called zball. Zball is magic. It grows larger every day. On the first day, it becomes $1$ time as large as its original size. On the second day,it will become $2$ times as large as the size on the first day. On the n-th day,it will become $n$ times as large as the size on the (n-1)-th day. Tina want to know its size on the (n-1)-th day modulo n.\u003cbr\u003e\n\nTina Town 是一个善良友好的地方,这里的每一个人都互相关心。Tina有一个球,它的名字叫zball。\u003cbr\u003e \u003cbr\u003e\n\nzball很神奇,它会每天变大。在第一天的时候,它会变大1倍。\u003cbr\u003e\u003cbr\u003e\n\n在第二天的时候,它会变大2倍。在第n天的时候,它会变大n倍。zball原来的体积是1。Tina想知道,zball在第n−1天时的体积对n取模是多大呢?\u003cbr\u003e\u003cbr\u003e\nTina是一个蠢蠢的女孩子,当然不会算啦,所以她请你帮她算出这个答案呢。\u003cbr\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The first line of input contains an integer $T$, representing the number of cases.\u003cbr\u003e\u003cbr\u003e\nThe following $T$ lines, each line contains an integer $n$, according to the description.\u003cbr\u003e\n$ T \\leq {10}^{5},2 \\leq n \\leq {10}^{9} $\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output an integer representing the answer."}},{"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\u003e\u003cpre\u003e2\n3\n10\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e\u003cpre\u003e2\n0\u003c/pre\u003e\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}