题目链接:1323: Repeat Number

Description

Definition: a+b = c, if all the digits of c are same ( c is more than ten),then we call a and b are Repeat Number. My question is How many Repeat Numbers in [x,y].

定义:a + b = c,如果 c 的每一位数字相同(c > 10),那么我们就把 a 和 b 称为重复数,问题是在区间 [x, y] 中有多少对这样的 a,b 使得 c 满足上述条件。

Input

There are several test cases.

Each test cases contains two integers x, y(1<=x<=y<=1,000,000) described above.

Proceed to the end of file.

多组测试数据。

每组数据输入两个整数 x,y (1 <= x <= y <= 1000000)。

Output

For each test output the number of couple of Repeat Number in one line.

每组数据,输出有多少对满足条件的 a,b。

Sample Input

1 8
1 10
1 12
1 18
1 25
10 100
20 1000
30 10000
40 100000
50 1000000

Sample Output

3
5
7
15
29
213
2868
31461
320892
3220161

HINT

If a equals b, we can call a, b are Repeat Numbers too, and a is the Repeat Numbers for itself.

分析

WUSTOJ 1323: Repeat Number(Java)规律统计的更多相关文章

  1. Repeat Number

    Problem B: Repeat Number Time Limit: 1 Sec  Memory Limit: 32 MB Description Definition: a+b = c, if ...

  2. 2014辽宁省赛 Repeat Number

    问题 C: Repeat Number 时间限制: 1 Sec  内存限制: 128 MB [cid=1073&pid=2&langmask=0">提交][状态][论坛 ...

  3. Repeat Number(数论)

    Repeat Number 题目描述: Definition: a+b = c, if all the digits of c are same ( c is more than ten), then ...

  4. 编写Java脚本统计工程代码总行数

    在新公司工作将近一年了,一直独自一人负责服务端集群的运维和代码的编写.不知不觉从一个Project发展到了七八个Project. 看着越来越多的代码,今天突然想统计一下一共写了多少代码.[这里只统计完 ...

  5. WUSTOJ 1285: Factors(Java)

    1285: Factors 参考   hadis_fukan的博客--wustoj 1285 Factors 题目   输入一个数n,找出1~n之间(包括1,n)的质因子最多的数(x)的质因子个数(f ...

  6. Java报表统计导出Word-xdocin方式

    官网:http://www.xdocin.com Controller层: //创建对象 XDocService xdocService = new XDocService(); //封装参数 Map ...

  7. WUSTOJ 1319: 球(Java)并查集

    题目链接:1319: 球 参考:wustoj 1319 球-wust_tanyao,并查集 并查集系列:WUSTOJ 1346: DARK SOULS(Java)并查集 Description Icy ...

  8. [CareerCup] 18.4 Count Number of Two 统计数字2的个数

    18.4 Write a method to count the number of 2s between 0 and n. 这道题给了我们一个整数n,让我们求[0,n]区间内所有2出现的个数,比如如 ...

  9. LeetCode----202. Happy Number(Java)

    package isHappy202; /* * Write an algorithm to determine if a number is "happy". A happy n ...

随机推荐

  1. ADO.NET五大对象增删改查使用

    string ConnStr = "Data Source=.;Initial Catalog=ADO_DEMO;Integrated Security=True"; #regio ...

  2. The Matrix | 黑客帝国

    今天又刷了一遍,依旧跟第一次看一样,非常惊叹震撼,同时也发现了更多的细节. 梳理一下情节: 开始就是Trinity在matrix里被黑衣人Agent追杀,Trinity团队的目的是寻找Neo,显然Ag ...

  3. 通过字节码分析this关键字以及异常表的作用

    1.创建MyTest3类 public class MyTest3 { public void test(){ try { InputStream is = new FileInputStream(& ...

  4. 枚举(Enum)

    enum是一个全新的“类”. 枚举(Enum): 我们所定义的每个枚举类型都继承自java.lang.Enum类.枚举中的每个成员都是public static final的. 当您使用“enum”定 ...

  5. mosquitto设置用户名和密码

    https://blog.csdn.net/qq_22111417/article/details/84142509 7.设置用户名和密码 找到用户密码文件在安装bin下: 1: 打开mosquitt ...

  6. hyper-v启动虚拟机时提示“The application encountered an error while attempting to change the state of the machine ‘虚拟机名称'”如何处理?

    1. 找出发生这一问题的事件代号 1.1 在开始菜单中搜索程序Event Viewer并点击进入 1.2 点击路径如下: “Applications and Services Logs > Mi ...

  7. uefi下如何启动linux?

    1. 有两种方式 1.1 直接从uefi shell启动linux内核 1.2 从uefi shell启动grub,然后再从grub启动linux内核 2. 需要哪些东西? 2.1 linux内核 2 ...

  8. 【转载】 DeepMind发表Nature子刊新论文:连接多巴胺与元强化学习的新方法

    原文地址: baijiahao.baidu.com/s?id=1600509777750939986&wfr=spider&for=pc 机器之心 18-05-15   14:26 - ...

  9. Python3基础 函数 返回值 利用元组返回多个值

             Python : 3.7.3          OS : Ubuntu 18.04.2 LTS         IDE : pycharm-community-2019.1.3    ...

  10. JS实现动态添加和删除div

    实现方式一:只在最后一个数据中动态添加或者删除 | 背景需要做一个页面,页面可以输入参数,点击确认按钮可以发请求给某接口.但是接口的某个字段是数组类型,所以在页面上需要实现添加或者删除元素的功能. | ...