{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\n\u003cp\u003e一个高度为$$$1$$$的卡片金字塔是通过将两张卡片靠在一起构建的。对于$$$h\u0026gt;1$$$,高度为$$$h$$$的卡片金字塔是通过将高度为$$$h-1$$$的卡片金字塔放在一个基座上构建的。基座由$$$h$$$个高度为$$$1$$$的金字塔和$$$h-1$$$张卡片组成。例如,高度为$$$1$$$、$$$2$$$和$$$3$$$的卡片金字塔如下所示:\u003c/p\u003e\n\u003ccenter\u003e\n \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/7750853207fdcbfd116743bb07919df7?v\u003d1697925404\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\n\u003c/center\u003e\n\u003cp\u003e你从$$$n$$$张卡片开始构建最高的金字塔。如果还有一些卡片剩下,你将用剩下的卡片构建最高的金字塔。你重复这个过程,直到无法再构建另一个金字塔。最后,你将构建多少个金字塔?\u003c/p\u003e\n"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e每个测试包含多个测试用例。第一行包含一个整数$$$t$$$($$$1\\le t\\le 1000$$$)- 测试用例的数量。接下来的$$$t$$$行包含测试用例的描述。\u003c/p\u003e\n\u003cp\u003e每个测试用例包含一个整数$$$n$$$($$$1\\le n\\le 10^9$$$)- 卡片的数量。\u003c/p\u003e\n\u003cp\u003e保证所有测试用例中$$$n$$$的总和不超过$$$10^9$$$。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e对于每个测试用例,输出一个整数 - 最后你将构建的金字塔的数量。\u003c/p\u003e"}},{"title":"示例1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003e输入\u003c/th\u003e\n \u003cth\u003e输出\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n3\n14\n15\n24\n1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n2\n1\n3\n0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"注意","value":{"format":"HTML","content":"\u003cp\u003e在第一个测试中,你用$$$2$$$张卡片构建了一个高度为$$$1$$$的金字塔。还剩下$$$1$$$张卡片,不足以构建一个金字塔。\u003c/p\u003e\n\u003cp\u003e在第二个测试中,你构建了两个高度为$$$2$$$的金字塔,没有剩余的卡片。\u003c/p\u003e\n\u003cp\u003e在第三个测试中,你构建了一个高度为$$$3$$$的金字塔,没有剩余的卡片。\u003c/p\u003e\n\u003cp\u003e在第四个测试中,你用$$$9$$$张卡片构建了一个高度为$$$3$$$的金字塔。然后你用$$$2$$$张卡片构建了一个高度为$$$2$$$的金字塔。最后,你用没有剩余的卡片构建了一个高度为$$$1$$$的金字塔。\u003c/p\u003e\n\u003cp\u003e在第五个测试中,一张卡片不足以构建任何金字塔。\u003c/p\u003e"}}]}