| ||||||||||
| 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 | |||||||||
不知道为什么总是WA.请各位看看.#include "Stdio.h"
int main()
{
double n,d,b,e;
int num,r;
int i,j,t;
int k;
scanf("%d",&num);
for(i=0;i<num;i++)
{
scanf("%lf%lf%lf%lf",&n,&d,&b,&e);
printf("Problem set %d: %.0lf / %.0lf, base 7 digits %.0lf through %.0lf: ",i+1,n,d,b,e);
for(j=0;j<=e;j++)
{
k=7*(int)n%(int)d;
r=7*(int)n/(int)d;
n=k;
if(j>=b)printf("%d",r);
}
printf("\012");
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator