标签:nyoj字符串右移
abcd1234 4 sdfe123f 10
1234abcd 3fsdfe12
#include<cstdio> #include<cstdlib> #include<cstring> using namespace std; char str[10000]; int main() { int l,k,i; while(scanf("%s %d",str,&k)!=EOF){ l=strlen(str); k=l-k%l; for(i=k;i<l;++i) printf("%c",str[i]); for(i=0;i<k;++i) printf("%c",str[i]); printf("\n"); } return 0; }
标签:nyoj字符串右移
原文地址:http://blog.csdn.net/r1986799047/article/details/43486475