| ||||||||||
| 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 | |||||||||
差不多的!!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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator