B. 百合花数

    Type: Default File IO: number 1000ms 256MiB

百合花数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

我们定义百合花数如下:

百合花数指一个 2n2n 位正整数(首位不为 00),从最高位起,它的每连续两位数字之和为 1010

例如 1919 是一个 22 位百合花数,37733773 就是一个 44 位百合花数,823755286455823755286455 就是一个 1212 位百合花数。

请求出满足下列条件的数 xx 的个数:

  1. 13x13|x
  2. x[L..R]x\in[L..R]
  3. xx 是百合花数。

输入格式

从标准输入读入数据。

输入两个正整数 L,RL,RLR1012L\le R\le 10^{12})。

输出格式

输出到标准输出。

输出一个非负整数,为所求数的个数。

90 100

1

1000 10000000

64

数据范围

对于 100%100\% 的数据,有 LR1012L\le R\le 10^{12}

1128信心赛

Not Attended
Status
Done
Rule
IOI
Problem
4
Start at
2025-11-28 8:20
End at
2025-11-28 11:41
Duration
3.4 hour(s)
Host
Partic.
16