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 dingyihamigua at 2007-10-01 15:20:24 on Problem 2710
In Reply To:不要先输出换行,一行输出完成后再输出换行吧 Posted by:wrong123 at 2005-12-10 20:13:49
#include<stdio.h>
int main()
{
    int i,j,m;
	int n,d,b,e;
    while(scanf("%d",&m)==1&&m){
		for(i=0;i<m;i++)
		{
			scanf("%d%d%d%d",&n,&d,&b,&e);
			printf("Problem set %d: %d / %d, base 7 digits %d through %d: ",i+1,n,d,b,e);
			for(j=0;j<=e;j++)
			{
				if(j>=b) printf("%d",7*(n%d)/d);
				n=7*n%d;
			}
			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