{"trustable":false,"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\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e如果字符串 \u003cb\u003ex\u003c/b\u003e 在复制若干次并拼接起来后,可以得到字符串 \u003cb\u003ea\u003c/b\u003e,则称 \u003cb\u003ex\u003c/b\u003e 是 \u003cb\u003ea\u003c/b\u003e 的因子串。\u003c/p\u003e\n\u003cp\u003e对于给定的两个字符串,找出它们的公共“因子串”的个数。\u003c/b\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e第一行输入一个字符串 \u003cb\u003es\u003csub\u003e1\u003c/sub\u003e\u003c/b\u003e。\u003c/p\u003e \n\u003cp\u003e第二行输入一个字符串 \u003cb\u003es\u003csub\u003e2\u003c/sub\u003e\u003c/b\u003e。\u003c/p\u003e \n\u003cp\u003e两个字符串的长度都在 \u003cb\u003e1\u003c/b\u003e 到 \u003cb\u003e10\u003csup\u003e5\u003c/sup\u003e\u003c/b\u003e 之间,只包含小写字母。\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003e输出一个整数,表示公共“因子串”的个数。 \u003c/p\u003e"}},{"title":"Examples","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e \n \u003cdiv class\u003d\"input\"\u003e \n \u003cdiv class\u003d\"title\"\u003e\n 输入\n \u003c/div\u003e \n \u003cpre\u003eabcdabcd\u003cbr\u003eabcdabcdabcdabcd\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e \n \u003cdiv class\u003d\"output\"\u003e \n \u003cdiv class\u003d\"title\"\u003e\n 输出\n \u003c/div\u003e \n \u003cpre\u003e2\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e \n \u003cdiv class\u003d\"input\"\u003e \n \u003cdiv class\u003d\"title\"\u003e\n 输入\n \u003c/div\u003e \n \u003cpre\u003eaaa\u003cbr\u003eaa\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e \n \u003cdiv class\u003d\"output\"\u003e \n \u003cdiv class\u003d\"title\"\u003e\n 输出\n \u003c/div\u003e \n \u003cpre\u003e1\u003cbr\u003e\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e对于样例 1,公共“因子串”有 \u003cb\u003e\"abcd\"\u003c/b\u003e 和 \u003cb\u003e\"abcdabcd\"\u003c/b\u003e。\u003c/p\u003e \n\u003cp\u003e对于样例 2,公共“因子串”只有 \u003cb\u003e\"a\"\u003c/b\u003e。\u003c/p\u003e "}}]}