{"raw_statement":[{"iden":"statement","content":"Hongcow is learning to spell! One day, his teacher gives him a word that he needs to learn to spell. Being a dutiful student, he immediately learns how to spell the word.\n\nHongcow has decided to try to make new words from this one. He starts by taking the word he just learned how to spell, and moves the last character of the word to the beginning of the word. He calls this a _cyclic shift_. He can apply cyclic shift many times. For example, consecutively applying cyclic shift operation to the word \"abracadabra\" Hongcow will get words \"aabracadabr\", \"raabracadab\" and so on.\n\nHongcow is now wondering how many distinct words he can generate by doing the cyclic shift arbitrarily many times. The initial string is also counted."},{"iden":"input","content":"The first line of input will be a single string _s_ (1 ≤ |_s_| ≤ 50), the word Hongcow initially learns how to spell. The string _s_ consists only of lowercase English letters ('_a_'–'_z_')."},{"iden":"output","content":"Output a single integer equal to the number of distinct strings that Hongcow can obtain by applying the cyclic shift arbitrarily many times to the given string."},{"iden":"examples","content":"Input\n\nabcd\n\nOutput\n\n4\n\nInput\n\nbbb\n\nOutput\n\n1\n\nInput\n\nyzyz\n\nOutput\n\n2"},{"iden":"note","content":"For the first sample, the strings Hongcow can generate are \"_abcd_\", \"_dabc_\", \"_cdab_\", and \"_bcda_\".\n\nFor the second sample, no matter how many times Hongcow does the cyclic shift, Hongcow can only generate \"_bbb_\".\n\nFor the third sample, the two strings Hongcow can generate are \"_yzyz_\" and \"_zyzy_\"."}],"translated_statement":"[{\"iden\":\"statement\",\"content\":\"Hongcow 正在学习拼写！一天，他的老师给了他一个单词，他需要学会拼写。作为一位勤勉的学生，他立即学会了如何拼写这个单词。\\n\\nHongcow 想尝试用这个单词构造新单词。他从刚学会拼写的单词开始，将单词的最后一个字符移到开头。他称此为一个 _循环移位_。他可以多次应用循环移位。例如，连续对单词 \\\"abracadabra\\\" 应用循环移位，Hongcow 会得到单词 \\\"aabracadabr\\\"、\\\"raabracadab\\\" 等。\\n\\n现在 Hongcow 想知道，通过任意多次执行循环移位，他能生成多少个不同的单词。初始字符串也计入其中。\\n\\n输入的第一行是一个字符串 #cf_span[s]（#cf_span[1 ≤ |s| ≤ 50]），即 Hongcow 初始学会拼写的单词。字符串 #cf_span[s] 仅包含小写英文字母（'_a_'–'_z_'）。\\n\\n请输出一个整数，表示通过任意多次对给定字符串应用循环移位所能获得的不同字符串的数量。\\n\\n对于第一个样例，Hongcow 可以生成的字符串是 \\\"_abcd_\\\"、\\\"_dabc_\\\"、\\\"_cdab_\\\" 和 \\\"_bcda_\\\"。\\n\\n对于第二个样例，无论 Hongcow 执行多少次循环移位，他只能生成 \\\"_bbb_\\\"。\\n\\n对于第三个样例，Hongcow 可以生成的两个字符串是 \\\"_yzyz_\\\" 和 \\\"_zyzy_\\\"。\\n\\n\"},{\"iden\":\"input\",\"content\":\"输入的第一行是一个字符串 #cf_span[s]（#cf_span[1 ≤ |s| ≤ 50]），即 Hongcow 初始学会拼写的单词。字符串 #cf_span[s] 仅包含小写英文字母（'_a_'–'_z_'）。“},{\"iden\":\"output\",\"content\":\"请输出一个整数，表示通过任意多次对给定字符串应用循环移位所能获得的不同字符串的数量。\"},{\"iden\":\"examples\",\"content\":\"输入\\nabcd\\n输出\\n4\\n输入\\nbbb\\n输出\\n1\\n输入\\nyzyz\\n输出\\n2\"},{\"iden\":\"note\",\"content\":\"对于第一个样例，Hongcow 可以生成的字符串是 \\\"_abcd_\\\"、\\\"_dabc_\\\"、\\\"_cdab_\\\" 和 \\\"_bcda_\\\"。对于第二个样例，无论 Hongcow 执行多少次循环移位，他只能生成 \\\"_bbb_\\\"。对于第三个样例，Hongcow 可以生成的两个字符串是 \\\"_yzyz_\\\" 和 \\\"_zyzy_\\\"。\"}]","sample_group":[],"show_order":[],"formal_statement":"Let $ s $ be a string of length $ n $, where $ 1 \\leq n \\leq 50 $, consisting of lowercase English letters.\n\nDefine the cyclic shift operation as:  \nFor a string $ s = s_0 s_1 \\dots s_{n-1} $, the cyclic shift produces $ s' = s_{n-1} s_0 s_1 \\dots s_{n-2} $.\n\nLet $ S = \\{ s^{(k)} \\mid k = 0, 1, \\dots, n-1 \\} $, where $ s^{(k)} $ is the string obtained by applying $ k $ cyclic shifts to $ s $ (with $ s^{(0)} = s $).\n\nThe number of distinct strings obtainable is:  \n$$\n\\left| \\left\\{ s^{(k)} \\mid k \\in \\{0, 1, \\dots, n-1\\} \\right\\} \\right|\n$$\n\nThat is, the size of the set of all distinct rotations of $ s $.","simple_statement":null,"has_page_source":false}