题目链接: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. 第10组 Alpha冲刺(1/6)

    链接部分 队名:女生都队 组长博客: 博客链接 作业博客:博客链接 小组内容 史恩泽(组长) 过去两天完成了哪些任务 描述 了解了反馈机制的实现原理 确定好算法的框架 对接口的规范化进行学习 展示Gi ...

  2. com.mysql.cj.jdbc.Driver 新特性jdbc.url连接供参考

    com.mysql.cj.jdbc.Driver 是 mysql-connector-java 6及以上版本中的参数详解: jdbc.url=jdbc:mysql://localhost:3306/t ...

  3. linux系统下以存储从大到小并以K,M,G为单位的方式查看当前目录下的文件信息

    zhuazai:https://blog.csdn.net/sty945/article/details/79830915 前言 ls命令 ls -a ls -l ll du命令 du -s du - ...

  4. file_get_contents("php://input")

    $data = file_get_contents("php://input");     php://input 是个可以访问请求的原始数据的只读流. POST 请求的情况下,最 ...

  5. nodejs五子棋online游戏开发视频教程,客户端cocos creator js

    开发的游戏是五子棋online,网络版的,服务端部分和客户端部分都在这个教程里面,可以看一下目录! 服务器nodejs游戏开发教程 使用Nodejs开发网络服务器 游戏服务端 ,cocos creat ...

  6. 【Tomcat】本地域名访问配置

    原路径:localhost:8080/jsja 1.把8080端口改为80端口 打开%TOMCAT_HOME%/conf/server.xml <Connector connectionTime ...

  7. C# ffmpeg 视频处理格式转换具体案例

    C# ffmpeg 视频处理格式转换 C# ffmpeg 视频处理格式转换avi到MP4格式 1.代码如下: using System;using System.Diagnostics; namesp ...

  8. Linux 限制IP——/etc/hosts.allow和/etc/hosts.deny文件【转】

    就像是 限制特定IP来访 想法 看起来通常的做法是利用hosts的拒绝设置,而它的设置是针对某一个具体的进程,具体的服务,在这里就是sshd了 看起来设置一个网段使用的是 x.x.x.0/24 后面加 ...

  9. Mysql的三种数据类型

    Mysql的三种数据类型 1.数值类型 2.日期和时间类型 3.字符串类型 00x1 [数值类型] 00x2 [日期和时间类型] 00x3 [字符串类型]

  10. Dart中的mixins

    /* mixins的中文意思是混入,就是在类中混入其他功能. 在Dart中可以使用mixins实现类似多继承的功能,with关键字 因为mixins使用的条件,随着Dart版本一直在变,这里讲的是Da ...