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

PE 实在看不出为什么 热心人给看看

Posted by ArXiV at 2005-11-20 21:10:05 on Problem 2710
#include"iostream.h"
#include"stdio.h"

int main(void)
{
    int i,j,m;
    cin>>m;
    int *n=new int[m];
    int *d=new int[m];
    int *b=new int[m];
    int *e=new int[m];
    for(i=0;i<m;i++)
        cin>>n[i]>>d[i]>>b[i]>>e[i];
    for(i=1;i<=m;i++)
    {
        printf("\nProblem set %d: %d / %d, base 7 digits %d through %d: ",i,n[i-1],d[i-1],b[i-1],e[i-1]);
        for(j=0;j<=e[i-1];j++)
        {
            if(j >= b[i-1]) printf("%d",7*(n[i-1]%d[i-1]) / d[i-1]);
            n[i-1]=7*n[i-1] % d[i-1];
        }
    }
    return 1;
}

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