编程介的小学生 2019-04-11 01:15 采纳率: 20.5%
浏览 256

如何重复输出这里的数字的序列的,采用C程序的语言的设计的办法

Problem Description
Cloud gets a string which contains only lower-case letters from Miceren as a birthday gift.

Since Cloud hates repeating, if a substring can be divided into several equal strings, she will be very disgusted. For example, "abcabcabc" is very disgusting for her, but "abca" is just ok.

Now, Cloud wants to know how many non-empty substring would not disgust her. As you know, Miceren is not good at counting, can you help him?

Input
The first line contains a single integer T, indicating the number of test cases.

Each test case contains only one line, containing the string.

T is about 10.

The length of string will not exceed 100100.

Output
For each test case, print the answer.

Sample Input
1
abcabc

Sample Output
20

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 求数学坐标画圆以及直线的算法
    • ¥35 平滑拟合曲线该如何生成
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题
    • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
    • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
    • ¥15 自己瞎改改,结果现在又运行不了了
    • ¥15 链式存储应该如何解决