Sponsors

Tag: problem: (A) Hongcow Learns the Cyclic Shift Solution in C/C++

Codeforces Round #385 (Div....

#include<stdio.h> #include<string.h> void cycle(char s,int len) { char temp=s; int i; for(i=len-1;i>0;i--) { s=s; } s=temp; } int main(){ char s,orig; int len,count=0; scanf("%s",s); len=strlen(s); strcpy(orig,s); do { cycle(s,len); count++; } while(strcmp(orig,s)); printf("%dn",count); return...

Advertisement

spot_img