HDU - 2099 整除的尾数
2016-08-21 23:20
344 查看
注意一下输出,当答案小于 10 的时候前面要添 0。
INPUT |
---|
2 9 |
0 0 |
OUTPUT |
---|
08 17 26 35 44 53 62 71 80 89 98 |
#include<iostream> #include<cstdio> #include<cmath> #include<string.h> #include<stdlib.h> #include<algorithm> using namespace std; int ans[200]; int main() { int a, b; while (scanf("%d%d",&a, &b) != EOF && a+b) { int c = (a + 1) * 100; a = a * 100; int tag = 0; for (int i = a; i < c; i++) if (i%b == 0) ans[tag++] = i; for (int i = 0; i < tag-1; i++) printf("%02d ", ans[i] - a); printf("%02d\n", ans[tag-1] - a); } return 0; }
相关文章推荐
- Hdu 2099 整除的尾数
- HDU 整除的尾数 2099
- hdu 2099 整除的尾数
- HDU:2099 整除的尾数(水)
- hdu 2099 整除的尾数
- 整除的尾数 HDU - 2099
- HDU 2099 整除的尾数(暴力模拟)
- hdu 2099 整除的尾数
- HDU2099 整除的尾数
- hdu2099 整除的尾数
- hdu 2099 整除的尾数
- HDU 2099 整除的尾数(格式易题)
- HDU 2099 整除的尾数
- HDU 2099 整除的尾数
- HDU 2099 整除的尾数
- hdu 2099(整除的尾数)
- HDU2099 整除的尾数
- HDU 2099 整除的尾数
- hdu 2099 整除的尾数
- HDU 2099 整除的尾数