PS:因为还是不爽...继续水题...感觉这道题就是考输出..

代码:

#include "stdio.h"
void cal(int a,int b);
int main(){
int a,b,i;
while(~scanf("%d%d",&a,&b) && (a || b)){
a*=;
cal(a,b);
}
return ;
}
void cal(int a,int b){
int i,flag=;
for(i=;i<=;i++){
if(flag==){
if((a+i)%b==){
if(i>=){
printf("%d",i);
flag++;
}
else{
printf("0%d",i);
flag++;
}
}
}
else{
if((a+i)%b==){
if(i>=){
printf(" %d",i);
}
else
printf(" 0%d",i);
}
}
}
puts("");
}

PS:看了大神的代码...又get到一个技能...printf("02d",2); 输出结果是02...神奇...

hdu 2099的更多相关文章

  1. HDU 2099 整除的尾数(枚举 & 暴搜)

    原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=2099 思路分析:这道题的解法可以说是相当暴力了,但也有一些小坑,以下几点萌新们值得留意一下: 1. 仔 ...

  2. hdu 2099 整除的尾数

    Problem Description 一个整数,只知道前几位,不知道末二位,被另一个整数除尽了,那么该数的末二位该是什么呢?   Input 输入数据有若干组,每组数据包含二个整数a,b(0< ...

  3. 【水】HDU 2099——整除的尾数

    来源:点击打开链接 数据范围小,枚举水过就行了……不过要注意格式! #include <iostream> #include <cstring> #include <io ...

  4. HDU 整除的尾数 2099

    解题思路:很简单的一道水题,这几天比较忙,没怎么刷题,找找自信,很快1A.   还可以,嘿嘿 #include<cstdio> #include<cstring> #inclu ...

  5. HDU——PKU题目分类

    HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 ...

  6. [转] HDU 题目分类

    转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008 ...

  7. HDU ACM 题目分类

    模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 104 ...

  8. HDU 5643 King's Game 打表

    King's Game 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5643 Description In order to remember hi ...

  9. 转载:hdu 题目分类 (侵删)

    转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...

随机推荐

  1. iOS应用架构谈 组件化方案

    转载: iOS应用架构谈 组件化方案 简述 前几天的一个晚上在infoQ的微信群里,来自蘑菇街的Limboy做了一个分享,讲了蘑菇街的组件化之路.我不认为这条组件化之路蘑菇街走对了.分享后我私聊了Li ...

  2. [翻译]了解ASP.NET底层架构(八)

    原文地址:http://www.cnblogs.com/tmfc/archive/2006/09/04/493304.html [翻译]了解ASP.NET底层架构(完) [翻译]了解ASP.NET底层 ...

  3. canvas调节视频颜色

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. [saiku] 源码整合[普通WEB项目]

    saiku源码的整合分为[普通web项目整合]和[maven整合]两种 本节主要是讲解如何整合为普通的web项目 转载自:http://blog.csdn.net/gsying1474/article ...

  5. Hibernate4+Spring JPA+SpringMVC+Volecity搭建web应用(一)

    pom.xml配置 <dependencies> <!-- hibernate begin --> <dependency> <groupId>org. ...

  6. MyBatis核心配置文件模版

      <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLI ...

  7. openCV1

    openCV是一个提供有C++ , android , python的开源图像处理的类库 中文论坛的网址是http://www.opencv.org.cn/forum.php?mod=forumdis ...

  8. android 定制目录

    首先简单介绍一下安卓系统文件夹对照表 主要介绍的是Android系统的文件夹结构,帮助大家更直观地了解系统 \\system\\app这个里面主要存放的是常规下载的应用程序,可以看到都是以APK格式结 ...

  9. Steam和Byte[]之间进行输换

    一. 二进制转换成图片 MemoryStream ms = new MemoryStream(bytes); ms.Position = 0; Image img = Image.FromStream ...

  10. Ubuntu 下Eclipse 安装SVN

    如果尚未安装Eclipse,先安装:也可以直接下载Google提供的ADT Bundle. sudo apt-get install eclipse 安装Subversion sudo apt-get ...