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 |
贴个简短的代码#include<cstdio> int main() { int cc,k,a,b,c,d,i; scanf("%d",&cc); for(k=1;k<=cc;k++) { scanf("%d%d%d%d",&a,&b,&c,&d); printf("Problem set %d: %d / %d, base 7 digits %d through %d: ",k,a,b,c,d); a%=b; for(i=0;i<=d;i++) { a*=7; if(i>=c) printf("%d",a/b); a%=b; } printf("\n"); } return 0; } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator