hdu 2099 整除的尾数
来源:互联网 发布:java特殊字符转义 编辑:程序博客网 时间:2024/05/16 18:04
/......................................................................................................................................................\
wa了好几次,不知道为什么,格式的输出一定注意,特别是小于10的数的输出,
还有输出是空格
\....................................................................................................................................................../
ac代码:
#include<stdio.h>#include <iostream>#include<string.h>#include<stdlib.h>#include<math.h>#include<algorithm>#include<list>#include<vector>#pragma comment(linker,"/STACK:102400000,102400000")using namespace std;int main() { int a,b,i,s[110],count,k; while(scanf("%d%d",&a,&b),a||b) { k=0; for(i=0;i<100;i++) { if((a*100+i)%b==0) { s[k++]=i; } } printf("%02d",s[0]); for(i=1;i<k;i++) printf(" %02d",s[i]); printf("\n"); } return 0; }wa的代码:
看到的请解释下为什么?
#include<stdio.h>#include <iostream>#include<string.h>#include<stdlib.h>#include<math.h>#include<algorithm>#include<list>#include<vector>#pragma comment(linker,"/STACK:102400000,102400000")using namespace std;int main() { int a,b,i,s[110]; while(scanf("%d%d",&a,&b),a||b) { int k=0; for(i=a*100;i<a*100+100;i++) { if(i%b==0) s[k++]=i%a; } printf("%02d",s[0]); for(i=1;i<k;i++) printf(" %02d",s[i]); printf("\n"); } return 0; }
- HDU 2099 整除的尾数
- HDU 2099 整除的尾数
- hdu 2099 整除的尾数
- hdu-2099-整除的尾数
- HDU 2099 整除的尾数
- 整除的尾数(HDU 2099)
- HDU 2099 整除的尾数
- hdu-2099-整除的尾数
- hdu 2099 整除的尾数
- hdu 2099整除的尾数
- HDU~2099 整除的尾数
- hdu 2099 整除的尾数
- HDU 2099 整除的尾数
- HDU 2099 整除的尾数
- HDU 2099 -- 整除的尾数
- HDU 2099 整除的尾数
- HDU 2099 整除的尾数
- hdu 2099 整除的尾数
- 介绍一下海量数据的处理方法
- OpenCV找图像的连通域
- SSH框架搭建的全过程
- 三层架构与MVC的区别1
- Ubuntu下使用苹果Monaco字体
- hdu 2099 整除的尾数
- loner_li JQuery插件 实现相册光箱特效(后台数据库调图片和前台直接显示)
- HTTP请求流程(二)----Telnet模拟HTTP请求
- ubuntu下firefox安装flash
- C/C++的字符串和JAVA的String对象
- 『免费素材』15套提升设计的高质量纹理素材下载
- 米勒-拉宾素数测试
- apue习题10.5
- POJ 2352 Stars