P26756 [AtCoder] Takahashi Calendar
入门
题目描述

Problem Description

Today is August 24th, one of the few "Product Days" in the year.

If $d$ is a two-digit integer, and $d_1$ is the units digit and $d_{10}$ is the tens digit of $d$, then the date $m$ month $d$ day is called "Product Day" if $m$, $d_1$, and $d_{10}$ satisfy all the following conditions:

  • $d_1 \geq 2$
  • $d_{10} \geq 2$
  • $d_1 \times d_{10} = m$

Takahashi wants to increase the number of these days. He created a calendar called "Takahashi Calendar" where a year consists of $M$ months from January to $M$th month, and each month has $D$ days from 1st to $D$th day.

In the Takahashi Calendar, how many Product Days are there in a year?

Input Format

The input is given from the standard input in the following format:

$M$ $D$

Output Format

Output the number of Product Days in a year in the Takahashi Calendar.

Sample Input and Output

Sample Input #1

15 40

Sample Output #1

10

Sample Input #2

12 31

Sample Output #2

5

Sample Input #3

1 1

Sample Output #3

0

Notes/Hints

Constraints

  • All inputs are integers.
  • $1 \leq M \leq 100$
  • $1 \leq D \leq 99$

Sample Explanation 1

The Product Days in the year are as follows:
- April 22nd
- June 23rd
- June 32nd
- August 24th
- September 33rd
- October 25th
- December 26th
- December 34th
- April 27th
- May 35th

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
15 40
样例输出
10