本文共 1660 字,大约阅读时间需要 5 分钟。
Jimmy writes down the decimal representations of all natural numbers between and including m and n, (m ≤ n). How many zeroes will he write down?
Input
Input starts with an integer T (≤ 11000), denoting the number of test cases.
Each case contains two unsigned 32-bit integers m and n, (m ≤ n).
Output
For each case, print the case number and the number of zeroes written down by Jimmy.
Sample Input
5
10 11
100 200
0 500
1234567890 2345678901
0 4294967295
Output for Sample Input
Case 1: 1
Case 2: 22
Case 3: 92
Case 4: 987654304
Case 5: 3825876150
求m到n的数共有多少个0
要注意会出现01,001,0001这些前导0的情况,用first判断首位是否是0
lightoj的64位输入输出差点把我又坑一次
#include #include #include #include #include #include #include #include #include
转载地址:http://fvcvb.baihongyu.com/