{"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":"\u003cp\u003e3月14日,全世界都在庆祝“$$$\\pi$$$”这个数字。这是一个非常重要的数学常数,等于圆周长与直径的比值。\u003c/p\u003e\u003cp\u003e波利卡普在学校里听说“$$$\\pi$$$”是无理数,因此它在十进制表示法中有无限多位小数。他想要通过尽可能准确地记忆这个数字来为“$$$\\pi$$$”准备。\u003c/p\u003e\u003cp\u003e波利卡普写下了他记得住的所有数字。例如,如果波利卡普记得“$$$\\pi$$$”是“$$$3.1415$$$”,他会写下\u003cspan class\u003d\"tex-font-style-tt\"\u003e31415\u003c/span\u003e。\u003c/p\u003e\u003cp\u003e波利卡普匆忙之间可能会犯错,所以你决定检查一下他实际上记得准确的“$$$\\pi$$$”数字的前几位。\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e输入数据的第一行包含一个整数$$$t$$$($$$1 \\le t \\le 10^3$$$)— 测试中的测试用例数。\u003c/p\u003e\u003cp\u003e每个测试用例由波利卡普写下的一个数字字符串$$$n$$$描述。\u003c/p\u003e\u003cp\u003e字符串$$$n$$$包含最多$$$30$$$位数字。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e输出$$$t$$$个整数,每个整数是相应测试用例的答案,即波利卡普记得正确的“$$$\\pi$$$”数字的前几位。\u003c/p\u003e"}},{"title":"示例1","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\u003e9\n000\n3\n4141592653\n141592653589793238462643383279\n31420\n31415\n314159265358\n27182\n314159265358979323846264338327\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e0\n1\n0\n0\n3\n5\n12\n0\n30\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}