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 lnn_rqh at 2011-01-13 14:49:17 on Problem 2710
In Reply To:贴个简短的代码 Posted by:407811696 at 2011-01-13 11:11:04
> #include<cstdio>
> int main()
> {
> 	int cc,k,a,b,c,d,i;
> 	scanf("%d",&cc);
> 	for(k=1;k<=cc;k++)
> 	{
> 		scanf("%d%d%d%d",&a,&b,&c,&d);
> 		printf("Problem set %d: %d / %d, base 7 digits %d through %d: ",k,a,b,c,d);
> 		a%=b;
> 		for(i=0;i<=d;i++)
> 		{
> 			a*=7;
> 			if(i>=c)
> 				printf("%d",a/b);			
> 			a%=b;
> 		}
> 		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