Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

果断水过 附代码 有点烂 见谅

Posted by Ink213 at 2012-12-18 15:49:25 on Problem 2039
#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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator