HDU2099-整除的尾数

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2099

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    int a,b;
    while(~scanf("%d%d",&a,&b)){
        if(!a&&!b)
            break;
        int p=(a*100)%b;
        int t=(p==0?0:b-p);
        printf("%02d",t);
        while(1){
            t=t+b;
            if(t<100)
                printf(" %02d",t);
            else
                break;
        }
        printf("\n");
    }
return 0;
}

猜你喜欢

转载自blog.csdn.net/yimo_180227/article/details/81749190