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

Re:这学期第一道程序,发贴庆祝一下

Posted by nyhuang at 2016-08-30 23:13:35 on Problem 2083
In Reply To:这学期第一道程序,发贴庆祝一下 Posted by:jxd at 2006-09-19 13:56:41
> #include"stdio.h"
> #include"math.h"
> main()
> {
> 	int i,j,n,ii,jj,k;
> 	while(scanf("%d",&n)&&n--!=-1)
> 	{
> 		for(i=0;i<pow(3,n);i++,printf("\n"))
> 			for(j=0;j<pow(3,n);j++)
> 			{
> 				for(ii=i,jj=j,k=0;k<n&&(ii%3+jj%3)%2==0;ii/=3,jj/=3,k++);
> 				printf("%c",32+56*(k==n));
> 			}
> 		printf("-\n");
> 	} 
> }
666

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