POJ 2406
来源:互联网 发布:淘宝怎么买airbnb卷 编辑:程序博客网 时间:2024/06/05 01:00
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int comp(char *, int ,int );
int main()
{
char str[1000002];
int len;
scanf("%s",str);
while(strcmp(str, ".") != 0)
{
len = strlen(str);
for(int i = 1; i <= len; i++)
{
if(len % i == 0)
if(comp(str, i, len) == 1)
{
printf("%d/n",len/i);
break;
}
}
scanf("%s",str);
}
system("pause");
return 0;
}
//=================================//
int comp(char*str, int i, int len)
{
for(int j = 0; j < len; j++)
if(str[j % i] != str[j])
return 0;
return 1;
}
- POJ 2406
- POJ 2406
- poj 2406
- POJ 2406
- poj 2406
- poj 2406
- poj 2406
- poj 2406
- poj 2406
- poj 2406
- 【POJ 2406 】
- POJ 2406
- poj 2406
- POJ 2406
- poj 2406
- POJ-2406
- POJ 2406
- poj--2406
- 关于Manifest.txt 写入jar包的格式问题
- [SQL server]“从字符串转换为 datetime 时发生语法错误”的解决方法
- (转)学习Linux编程开发必读书籍
- 《Java程序设计》试卷三
- ACM_编程与调试重点记录(十七).doc
- POJ 2406
- POJ 2752
- POJ 3461
- 报到
- shell一些命令的测试(第六章 引用)
- LAMP开发精要(2):Wordpress 插件机制浅析
- 感慨!!!
- C#
- tomcat安装配置