| ||||||||||
| 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 | |||||||||
Presentation Error错误,做过这题的兄弟帮忙看一下问题在哪/*pku 2710*/
#include<stdio.h>
int main()
{
double n,d,b,e,n1;
int digit10;
int out;
int times;
int ii,jj,kk;
scanf("%d",×);
for(ii=1;ii<=times;ii++)
{
scanf("%lf%lf%lf%lf",&n1,&d,&b,&e);
n=(int)n1%(int)d;
jj=b;
while(jj--)
n=7*(int)n%(int)d;
printf("Problem set %d: %.0lf / %.0lf,base 7 digits %.0lf through %.0lf:",ii,n1,d,b,e);
for(kk=0;kk<e+1-b;kk++)
{
printf("%d",out=(int)(7*((int)n%(int)d/d)));
n=7*(int)n%(int)d;
}
printf("\n");
}
return 1;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator