Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
果断水过 附代码 有点烂 见谅#include<stdio.h> #include<string.h> int main(){ int len,i,j,k; char s[220]; while(scanf("%d%*c",&len)!=EOF){ if(len==0) break; gets(s); for(i=1;i<=len;i++){ for(j=i-1,k=1;j<strlen(s);k++,j+=k%2?2*i-1:(2*len-2*i+1)){ printf("%c",s[j]); } } printf("\n"); } return 0; } Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator