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:PE 实在看不出为什么 热心人给看看 Posted by:ArXiV at 2005-11-20 21:10:05 > #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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator