{"trustable":true,"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\"\u003eMZL的圈子周擅长解决一些计数问题。一天,他提出了一个计数问题:\u003cbr\u003e给定两个字符串$a,b$,它们只包含小写英文字母。你可以从字符串$a$中减去一个子字符串$x$(可能为空),从字符串$b$中减去一个子字符串$y$(也可能为空),然后将它们连接成$x+y$,在前面加上$x$,在后面加上$y$。这样就可以得到一系列新的字符串。\u003cbr\u003e问题是这样可以得到多少不同的新字符串。\u003cbr\u003e两个字符串不同,当且仅当它们长度不同或者存在整数$i$使得这两个字符串在位置$i$上的字符不同。\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"输入的第一行是一个整数$T~(T≤5)$,表示测试用例的数量。\u003cbr\u003e对于每个测试用例,有两行,第一行是字符串$a$,第二行是字符串$b$。$1\u0026lt;\u003d|a|,|b|\u0026lt;\u003d90000$。"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例,输出一行,一个整数表示答案。"}},{"title":"样例","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\u003e2\r\nacbcc\r\ncccabc\r\nbbbabbababbababbaaaabbbbabbaaaabaabbabbabbbaaabaab\r\nabbaabbabbaaaabbbaababbabbabababaaaaabbaabbaabbaab\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e135\r\n557539\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}