{"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已知数论的a,b公因子是c,当且仅当c能同时整除a和b \u003cbr\u003e\n\u003cp\u003ewyh现在想知道字符串a,b的公因子数有多少个。\u003cbr\u003e\n\u003cp\u003ewyh定义字符串x能整除y,当且仅当能通过循环x几次后得到y。\u003cbr\u003e\n\u003cp\u003efor example,\"ab\"和\"ababab\"都是“ababab”的因子。\n\u003cp\u003ec是a,b的公因子当且仅当c能同时整除a和b。\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e第一行输入一个字符串 a。\u003c/p\u003e \n\u003cp\u003e第二行输入一个字符串 b。\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输出一个整数,表示a,b的公因子数。 \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 "}}]}