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

不知道为什么总是WA.请各位看看.

Posted by kandmforever at 2006-05-08 20:38:17 on Problem 2710
#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:
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