标签:style blog http color os io for art
#include <cstdio> #include <cstring> int main() { int n; scanf("%d", &n); char s[100]; while(n--) { scanf("%s", s); int len = strlen(s); for(int i = 1; i <= len; i++) if(len % i == 0) { int k; for(k = i; k < len; k++) if(s[k] != s[k%i]) break; if(k == len) { printf("%d\n", i); if(n) printf("\n"); break; } } } }
UVa1225,Digit Counting,布布扣,bubuko.com
标签:style blog http color os io for art
原文地址:http://www.cnblogs.com/bingolibing/p/3869161.html