Problem:
 Score : 200 points    Problem Statement Today is August 24 , one of the five Product Days in a year.  A date m - d ( m is the month, d is the date) is called a Product Day when d is a two-digit number, and all of the following conditions are satisfied (here d_{10} is the tens digit of the day and d_1 is the ones digit of the day):   d_1 \geq 2  d_{10} \geq 2  d_1 \times d_{10} = m   Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of M month from Month 1 to Month M , and each month consists of D days from Day 1 to Day D .  In Takahashi Calendar, how many Product Days does a year have?      Constraints  All values in input are integers.  1 \leq M \leq 100  1 \leq D \leq 99         Input Input is given from Standard Input in the following format:  M  D       Output Print the number of Product Days in a year in Takahashi Calender.        Sample Input 1 15 40      Sample Output 1 10  There are 10 Product Days in a year, as follows ( m - d denotes Month m , Day d ):   4 - 22  6 - 23  6 - 32  8 - 24  9 - 33  10 - 25  12 - 26  12 - 34  14 - 27  15 - 35        Sample Input 2 12 31      Sample Output 2 5       Sample Input 3 1 1      Sample Output 3 0

Solution (Python):
import math

M,D = input().split()
M = int(M)
D = int(D)
cnt = 0

for i in range(4,M+1):
    for j in range(22,D+1):
        d1 = j%10
        d10 = math.floor(j/10)
        if d10 >= 2 and d1 >= 2 and d1 * d10 == i:
            cnt += 1
print(cnt)

Solution (Python):
M, D = map(int, input().split())
count = 0
for m in range(1,M+1):
    for d in range(1, D+1):
        d10 = d // 10
        d1 = d % 10
        if d1 * d10 == m and d1 > 1 and d10 > 1:
            count += 1
print(count)

Solution (Python):
M,D = map(int,input().split())
count = 0
for m in range(1,M+1):
    for d in range(1,D+1):
        d1 = d%10
        d10 = d//10
        if d1>=2 and d10>=2 and d1*d10==m:
            count += 1
print(count)

Solution (Python):
import sys
input = sys.stdin.readline
m,d = map(int,input().split())
cnt = 0
for i in range(1,m+1):
  for j in range(1,d+1):
    j1 = j%10
    j2 = int((j%100-j%10)/10)
    if j1>1 and j2>1 and j1*j2==i:
      cnt += 1
print(cnt)

Solution (Python):
M,D=map(int,input().split())
if D<21:
        print('0')
else:
        ans=0
        for i in range(22,D+1):
                d10=int(str(i)[0])
                d1=int(str(i)[1])
                if d10<2 or d1<2:
                        pass
                else:
                        if d10*d1<=M:
                                ans+=1
        print(ans)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for m in range(M+1):
    for d in range(D+1):
        d1 = d // 10
        d10 = d % 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
            ans += 1
print(ans)

Solution (Python):
m,d = map(int, input().split())
cnt = 0

for i in range(2,m+1):
    for j in range(22,d+1):
        if i == int(j/10)*(j%10) and (j%10) != 1:
            cnt += 1

print(cnt)

Solution (Python):
M,D = map(int, input().split())

matched = []
for i in range(22, D+1):
    d10 = int(i / 10)
    d1 = int(i % 10)
    if d10 < 2 or d1 < 2:
        continue
    if d10 * d1  <= M:
        matched.append((d10*d1, i))
print(len(matched))

Solution (Python):
def main():
    M,D=map(int, input().split())
    ans=0
    for m in range(1, M+1):
        for d in range(20, D+1):
            sd = str(d)
            d1=int(sd[-1])
            d10=int(sd[-2])
            if d1>=2 and d10>=2 and d1 * d10 == m:
                ans+=1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
m,d = map(int,input().split())

ans = 0

for i in range(2,m+1):
    for j in range(2,d+1):
        if j//10 >=2 and j%10 >=2 and i == (j//10) * (j%10):
            ans += 1

print(ans)

Solution (Python):
m,d = map(int,input().split())
ans = 0
if d < 22:
    print(ans)
    exit(0)
for i in range(22,d+1,1):
    
    for j in range(1,m+1):
        if (i//10)*(i%10) == j:
            if (i%10) >= 2:
                ans +=1
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

M, D = map(int, input().split())

if D < 22:
    print(0)
    sys.exit()

ans = 0
for i in range(22, D+1):
    if (i//10)*(i%10) <= M and i%10 > 1: 
        ans += 1

print(ans)

Solution (Python):
M, D = map(str, input().split())
M = int(M)

cnt = 0
for i in range(1, M+1):
    for j in range(1, int(D)+1):
        j = str(j)
        if len(j) == 2:
            if int(j[0]) >= 2 and int(j[1]) >= 2 and i == (int(j[0]) * int(j[1])):
                cnt += 1

print(cnt)

Solution (Python):
def main():
    M, D = map(int, input().split())
    count = 0

    for m in range(1, M+1):
        for d in range(1, D+1):
            if d < 22:
                continue
            d_str = str(d)
            d1 = int(d_str[0])
            d10 = int(d_str[1])
            if d1 >= 2 and d10 >= 2:
                if d1 * d10 == m:
                    count += 1
    print(count)


if __name__ == '__main__':
    main()

Solution (Python):
M, D = map(int, input().split())
cnt = 0
if(M < 4 or D < 22) :
    print(0)
else :
    for i in range(4, M + 1) :
        for j in range(22, D + 1) :
            d1 = j % 10
            d10 = j // 10
            if(d10 * d1 == i and d1 >= 2 and d10 >= 2) :
                cnt += 1
            else :
                pass
    print(cnt)

Solution (Python):
m,d=input().split(" ")
m=int(m)
d=int(d)
ans=0
for i in range(m):
    for j in range(d):
        if len(str(j+1))>=2:
            k=j+1
            k=str(k)
            if int(k[0])>=2 and int(k[1])>=2 and (i+1)==(int(k[0])*int(k[1])):
                ans+=1
print(ans)

Solution (Python):
m, d = map(int, input().split())
ans = 0
for i in range(m):
    m = i+1
    for j in range(d-19):
      d = j+20
      d1 = int(d/10)
      d2 = d%10
      if d2 > 1 and m == d1*d2:
          ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split())

count = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d10, d1 = divmod(d, 10)
        if d10 < 2 or d1 < 2:
            continue
        if d1 * d10 == m:
            count += 1

print(count)

Solution (Python):
m, d = map(int, input().split())
ans = 0

for i in range(1, m+1):
    for j in range(22, d+1):
        if j%10 >= 2 and j//10 >= 2 and i == (j%10) * (j//10):
            ans += 1

print(ans)

Solution (Python):
M, D = map(int, input().split())

result = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        if m >= 4 and d >= 22:
            d10, d1 = map(int, str(d))
            if d10 >= 2 and d1 >= 2 and d1 * d10 == m:
                result += 1
print(result)

Solution (Python):
M,D = map(int,input().split())
c = 0
for m in range(1,M+1):
    for d in range(1,D+1):
        d1 = d%10
        d10 = int((d-d1)/10)

        if d1 >= 2 and d10 >= 2 and d1*d10 == m:
            c+=1
print(c)

Solution (Python):
import numpy as np

M, D = map(int, input().split())

if D < 22:
    print(0)
    
else:
    d = np.arange(22, D+1)
    m = np.arange(1, M+1)
    ans = 0
    
    for i in d:
        if i % 10 != 1:
            i1 = i % 10
            i10 = i // 10
            if np.any(m==i1*i10):
                ans += 1
                
    print(ans)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


M, D = map(int, input().split())

count = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        if j < 20:
            continue

        J = list(str(j))
        d10 = int(J[0])
        d1 = int(J[1])

        if d1 >= 2 and d10 >= 2 and d1*d10 == i:
            count += 1

print(count)

Solution (Python):
m, d = map(int, input().split())
c = 0
for i in range(1, m+1):
    for j in range(1, d+1):
        d1 = j%10
        d10 = j//10
        if d1 > 1 and d10 > 1 and (d1 * d10 == i):
            c += 1
print(c)

Solution (Python):
import sys
from pprint import pprint

def solve(m, d):
    ans = 0
    if d < 22:
        print(ans)
        return

    for m_i in range(1, m+1):
        for d_i in range(22, d+1):
            if d_i % 10 < 2:
                continue
            if m_i == (d_i // 10) * (d_i % 10):
                
                ans += 1
    print(ans)

if __name__ == '__main__':
  m, d = map(int, sys.stdin.readline().strip().split(" "))
  solve(m, d)

Solution (Python):
m,d = map(int,input().split())
cnt = 0
for i in range(1,m+1):
  for j in range(1,d+1):
    d_2 = j//10
    d_1 = j%10
    if d_2*d_1 == i and d_2 > 1 and d_1 > 1:
      cnt += 1
print(cnt)

Solution (Python):
M,D = [int(zz) for zz in input().split()]

ans = 0
for i in range(M+1):
    for j in range(D+1):
        p = j//10
        q = j%10
        if p >= 2 and q >= 2 and p*q == i:
            ans += 1

print(ans)

Solution (Python):
a = list(map(int,input().split())) 

day = a[1]
cnt = 0

for x in range(day+1):
  if x >10:
    if int(str(x)[0]) >= 2 and int(str(x)[1]) >=2:
      if int(str(x)[0]) * int(str(x)[1]) <= a[0]:
        cnt += 1
        

print(cnt)

Solution (Python):
M,D = map(int,input().split())

count = 0
for m in range(2,M+1):
	for d in range(22,D+1):
		d_list = list(str(d))
		if int(d_list[1])*int(d_list[0]) == int(m) and int(d_list[1])>=2 and int(d_list[0])>=2:
			count +=1

print(count)

Solution (Python):
M,D=map(int,input().split())

print(sum([m==(d-d%10)*(d%10)/10 for m in range(1,M+1) for d in range(1,D+1) if (d-d%10)/10>=2 and d%10>=2]))

Solution (Python):
m,d = map(int,input().split())
ans = 0
for i in range(1,d+1):
    if i % 10 <= 1:
        continue
    if i // 10 <= 1:
        continue
    tmp_1 = i%10
    tmp_2 = i//10
    if tmp_1*tmp_2 <= m:
        ans += 1
        
print(ans)

Solution (Python):
M, D = [int(md) for md in input().split()]

ans = 0
for m in range(1, M+1):
  for d in range(1, D+1):
    
    dd = str(d)
    if len(dd) == 2:
      d10, d1 = int(dd[0]), int(dd[1])
      if d10 >= 2 and d1 >= 2 and m == d10 * d1:
        ans += 1

print(ans)

Solution (Python):
m,d = map(int, input().split())

ans = 0

for i in range(m):
    for j in range(d):
        d10 = int((j+1)/10)
        d1 = j+1-d10*10
        if d1 >= 2 and d10 >= 2 and d1*d10 == i+1:
            ans += 1
print(ans)

Solution (Python):
m,d = map(int,input().split())

count = 0

for i in range(1,m+1):
    for j in range(1,d+1):
        if j >= 22:
            one = int(str(j)[1])
            ten = int(str(j)[0])
            if one >= 2 and ten >= 2:
                if one * ten == i:
                    count += 1
                    
print(count)

Solution (Python):
M,D=map(int,input().split())

count = 0
for m in range(1,M+1):
  for d in range(1,D+1):
    d_1=d%10
    d_10=int(d/10)
    
    if(d_1 >= 2 and d_10 >= 2 and d_1*d_10 == m):
      count+=1

print(count)

Solution (Python):
M,D=map(int,input().split())
ans=0
try:
  for d in range(22,D+1):
    for m in range(1,M+1):
      D1=d//10
      D2=d-10*D1
      if D1*D2==m and D1>=2 and D2>=2:
        ans+=1
except:
  pass
print(ans)

Solution (Python):
M, D = map(int, input().split())
count = 0
for i in range(1, M+1):
    for j in range(20, D+1):
        d = str(j)
        d10 = int(d[0])
        d1 = int(d[1])
        if i == d10 * d1 and d1 >= 2 and d10 >= 2:
            count = count + 1

print(count)

Solution (Python):
m, d = [int(i) for i in input().split()]

count = 0

for i in range(1, m + 1):
    for j in range(10, d + 1):
        d10 = int(str(j)[0])
        d1 = int(str(j)[1])
        if (d10 >= 2 and d1 >= 2 and i == d10 * d1):
            count += 1

print(count)

Solution (Python):
M,D = map(int, input().split())

ans = 0
for m in range(1,M+1):
    for d in range(1,D+1):
        d = str(d)
        if len(d) == 1:
            continue
        if int(d[0]) < 2:
            continue
        if int(d[1]) < 2:
            continue

        if int(d[0]) * int(d[1]) == m:
            ans += 1
print(ans)

Solution (Python):
m,d=map(int,input().split())
ans=0
if d<22:
    print(0)
else:
    for j in range(1,m+1):
        for i in range(22,d+1):
            if int(str(i)[0])>=2 and int(str(i)[1])>=2 and int(str(i)[0])*int(str(i)[1])==j:
                ans+=1
    print(ans)

Solution (Python):
def main():
    m,d=map(int,input().split(' '))
    ans = 0
    for i in range(1,m+1):
        for j in range(1,d+1):
            if j%10 >= 2 and j//10 >= 2 and int(j%10)*int(j//10) ==i:
                ans += 1
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
m, d=map(int, input().split())
ans=0

for i in range(1, m+1):
    for j in range(10, d+1):
        d1=int(str(j)[0])
        d10=int(str(j)[1])
        if d1>=2 and d10>=2 and d1*d10==i:
            ans=ans+1

print(ans)

Solution (Python):
M, D = map(int, input().split())

result = 0

if D < 22:
    print(0)
else:
    for m in range(1, M+1):
        for d in range(22, D+1):
            d1 = d%10
            d10 = d//10
            if d1 > 1 and d1*d10 == m:
                result += 1
    print(result)

Solution (Python):
m,d = map(int,input().split())
count = 0
for i in range(1,m+1):
    for j in range(1,d+1):
        if j >= 22:
            d_s = str(j)
            if int(d_s[0])*int(d_s[1])==i and (int(d_s[0])>=2 and int(d_s[1])>=2):
                count += 1
print(count)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for m in range(4, M+1):
    for d in range(22, D+1):
        d = str(d)
        d_10, d_1 = int(d[0]), int(d[1])
        if d_10 < 2 or d_1 < 2:
            continue
        if d_10 * d_1 == m:
            ans += 1

print(ans)

Solution (Python):
M,D = map(int,input().split())

d10 = 2
d = 2

ans = 0

flag = 0
while True:
    if flag == 1:
        break
    while True:
        if d10*10 + d > D:
            flag = 1
            break
        if d >= 10:
            break
        if d10*d <= M:
            ans += 1
        d += 1
    d10 += 1
    d = 2

print(ans)

Solution (Python):
tmp = [int(i) for i in input().split(" ")]
m = tmp[0]
d = tmp[1]
if d < 22 or m<4:
    count = 0
else:
    count = 0
    for j in range(4,m+1):        
        for i in range(22, d+1):
            if i%10 < 2:
                continue
            if (int(i%10) * int(i//10)) == j:
                count += 1
print(count)

Solution (Python):
import sys
m, d = map(int, input().split())

if d < 22:
    print(0)
    sys.exit(0)

res = 0
for i in range(1, m+1):
    for j in range(22, d+1):
        if j//10 > 1 and j%10 >1:
            if (j//10) * (j%10) == i:
                res += 1
print(res)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d1, d10 = d%10, d//10
        if d1 >1 and d10 > 1 and d1*d10 == m:
            ans += 1
print(ans)

Solution (Python):
tmp=input().split()
M,D=tmp[0],tmp[1]

ans=0
for m in range(1,int(M)+1):
    for d in range(1,int(D)+1):
        if d<22: continue
        tmp=str(d)
        if (int(tmp[0])>=2 and int(tmp[1])>=2 and int(tmp[0])*int(tmp[1])==m): 
            ans+=1

print(ans)

Solution (Python):
M, D = map(int, input().split())
mul_day = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        if len(str(d)) < 2:
            continue
        d10, d1 = int(str(d)[0]), int(str(d)[1])
        if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
            mul_day += 1
print(mul_day)

Solution (Python):
import itertools
M, D = list(map(int, input().split()))

p = itertools.product(range(1, M+1), range(1, D+1))
c = 0
t_list = []
for m, d in p:
    d_10, d_1 = str(d).zfill(2)
    if int(d_10) == 1 or int(d_1) == 1:
        continue
    if m == int(d_10) * int(d_1):
        c += 1
        t_list.append((m, d_10, d_1))
print(c)

Solution (Python):
m, d = [int(x) for x in input().split()]

counter = 0

for im in range(1, m+1):
  for id in range(1, d+1):
    if (id // 10 < 2 or id % 10 < 2):
      continue
    if (im == (id // 10) * (id % 10)):
        counter += 1
        
print(counter)

Solution (Python):
f = lambda m, d: d > 19 and d % 10 > 1 and m == (d // 10) * (d % 10)
M, D = map(int, input().split())
print(sum(f(m, d) for m in range(1, M + 1) for d in range(22, D + 1)))

Solution (Python):
from sys import stdin

def main():
    M, D = map(int, input().split())

    ans = 0
    for m in range(3, M + 1):
        for d in range(22, D + 1):
            d1, d10 = divmod(d, 10)
            if d10 < 2:
                continue
            ans += m == d1 * d10
    print(ans)

input = lambda: stdin.readline()[:-1]
main()

Solution (Python):
m, d = map(int, input().split())

count = 0

if d <= 10:
    print(0)
    exit()
for j in range(4, m+1):
    for i in range(22, d+1):
        i = list(str(i))
        d1 = int(i[0])
        d2 = int(i[1])
        if d1 == 1 or d2 == 1:
            continue
        if d1*d2 == j:
            count += 1

print(count)

Solution (Python):
M,D=map(int,input().split())
ans = 0
for i in range(1,M+1):
  for j in range(1,D+1):
    m1 = j % 10
    m10 = j // 10
    if (m1 >= 2) and (m10 >= 2) and (m1*m10==i):
      ans += 1
print(ans)

Solution (Python):
m, d = map(int, input().split(' '))
res = 0
if d <= 21:
    pass
else:
    for i in range(1, m+1):
        for j in range(22, d+1):
            ten, one = divmod(j, 10)
            if one >= 2 and i == ten*one:
                res = res + 1
                
print(res)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

m, d = MAP()



count = 0
for i in range(1, m+1):
    for j in range(1, d+1):
        if j >= 20:
            d1 = j % 10
            d10 = j // 10
            

            if d1 >= 2:
                
                
                if d1 * d10 == i:
                    count += 1

        
        
        
        


print(count)

Solution (Python):
m, d = map(int, input().split())

ans = 0
for i in range(4, m+1) :
    for j in range(22, d+1) :
        d1 = j // 10
        d2 = j % 10
        if d2 < 2 :
            continue

        if d1 * d2 == i :
            ans += 1
            

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

M, D = map(int, input().split())

ans = 0
if D >= 22:
    for day in range(22, D+1):
        d1 = day % 10
        d10 = day // 10
        m = d1 * d10
        if d1 >= 2 and d10 >= 2:
            if 1 <= m and m <= M:
                ans += 1

print(ans)

Solution (Python):
m,d=map(int,input().split())
an=0

for i in range(1,m+1):
    for j in range(1,d+1):
        if j>10:
            if int(str(j)[0])>=2 and int(str(j)[1])>=2:
                if int(str(j)[0])*int(str(j)[1])==i:
                    an+=1

print(an)

Solution (Python):

import sys
import math
from collections import defaultdict


sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]


mod = 10**9 + 7


def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



M,D = II()

ans = 0

for i in range(M+1):
    for j in range(2,10):
        for k in range(2,10):
            if int(str(j)+str(k))>D:
                continue
            else:
                if i==j*k:
                    ans += 1

print(ans)

Solution (Python):
m,d = map(int,input().split())

c = 0
for j in range(1,m+1):
    d1 = 1
    d2 = 0
    for i in range(d):
        if d1 >= 2 and d2 >= 2 and d1*d2 == j:
            c += 1
        if d1 < 9:
            d1 += 1
        else:
            d1 = 0
        if d1 == 0:
            d2 += 1
            
print(c)

Solution (Python):
m, d = map(int, input().split())

cnt = 0
for j in range(1, m+1):
    for i in range(22, d+1):
        d1 = i % 10
        d10 = i // 10

        if d1 * d10 == j and d1 >= 2 and d10 >= 2:
            cnt += 1

print(cnt)

Solution (Python):

"""
Created on Sat Aug 24 21:02:49 2019

@author: kato yugo
"""

m, d = map(int,input().split())

ans = 0

if d >= 22:
    for i in range(m):
        month = i+1
        for j in range(d):
            day = j+1
            day10 = int(day/10)
            day1 = day%10
            
            if day1 >= 2 and day10 >=2:
                if day10*day1 == month:
                    ans += 1
                    
                    
print(ans)

Solution (Python):
m, d = map(int, input().strip().split())
k = 0

for i in range(1,d+1):
    if (i%10)*((i-i%10)/10) <= m and (i%10)*((i-i%10)/10) != 0 and i%10 >= 2 and i-i%10 >= 20:
        k += 1
        
print(k)

Solution (Python):
def possible(m,d):
    d = str(d)
    if len(d) < 2:
        return False
    if int(d[0]) >= 2 and int(d[1]) >= 2 and int(d[0])*int(d[1]) == m:
        return True
    return False

def main():
    m,d = map(int,input().split())
    ans = 0
    for month in range(1,m+1):
        for day in range(1,d+1):
            if possible(month,day):
                ans += 1

    print(ans)


main()

Solution (Python):
M, D = [int(i) for i in input().split()]
if D<10:
    print(0)
    exit()
res = 0

for m in range(M+1):
    for d in range(10,D+1):
        d_10 = d//10
        d_1 = d%10
        if m==(d_10 * d_1) and d_1 >= 2 and d_10 >= 2:
            res += 1

print(res)

Solution (Python):
m,d = map(int,input().split())
cnt = 0
for i in range(22,d+1):
	if i%10<=1:
		pass
	else:
		s = str(i)
		if  int(s[0])*int(s[1]) <= m:
			cnt += 1
print(cnt)

Solution (Python):
M,D = map(int, input().split())

ans = 0

if D <= 21:
    ans = 0
else:
    for d_ in range(22,D+1):
        d = list(map(int, str(d_)))
        if int(d[0])<2 or int(d[1])<2:
            continue
        for m in range(1,M+1):
            if d[0] * d[1] == m:
                ans += 1
print(ans)

Solution (Python):
m,n=map(int,input().split())
count=0
for a in range(m):
  for day in range(n):
    b=(day+1)//10
    c=(day+1)%10
    
    if a+1==b*c and b>=2 and c>=2:
      count+=1
print(count)

Solution (Python):
M,D = [int(s) for s in input().split(" ")]

if M < 2:
    print(0)
elif D < 12:
    print(0)
else:
    mulday = 0
    for m in range(2,M+1):
        for d in range(12,D+1):
            d10 = int(str(d)[0])
            d1 = int(str(d)[1])
            if d10 == 1 or d1 == 1:
                continue
            if d10*d1 == m:
                
                mulday+=1
                
    print(mulday)

Solution (Python):
M, D = map(int, input().split())

cnt = 0
for i in range(20, D+1):
  d1 = i % 10
  d2 = i //10
  
  if 0 < d1*d2 <= M and d1>1 and d2>1:

    cnt += 1

print (cnt)

Solution (Python):
m, d = map(int, input().split())
cnt = 0
for i in range(4, m+1):
  for j in range(10, d+1):
    d10, d1 = j//10, j%10
    if d1 < 2 or d10 < 2:
      continue
    if i == d10 * d1:
      
      cnt += 1
print(cnt)

Solution (Python):
m, d =map(int, input().split())
day=0
for i in range(1,m+1):
    for j in range(20,d+1):
        d1=j%10
        d10=(j-d1)/10
        if d1>=2 and d10>=2:
            if i==d1*d10:
                day+=1
                
print(day)

Solution (Python):
ans = 0
m, d = map(int, input().split())

for i in range(1, m + 1):
    for j in range(1, d + 1):
        if j >= 10 and int(str(j)[0]) >= 2 and int(str(j)[1]) >= 2 and int(str(j)[0]) * int(str(j)[1]) == i:
            ans += 1

print(ans)

Solution (Python):
m, d = map(int, input().split())
count = 0
for i in range(m):
    for j in range(d):
        d1 = (j+1) % 10
        d10 = (j+1) // 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == i+1:
            count += 1
print(count)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for i in range(int(M)):
    m = i+1
    for j in range(int(D)):
        d10= (j+1)//10
        d1 = (j+1)-d10*10
        if d1>=2 and d10>=2 and d1*d10 ==m:
            ans +=1
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

M, D = map(int, input().split())

ans = 0
for i in range(1, M + 1):
    for j in range(2, (D // 10) + 1):
        for k in range(2, 10):
            tmp = int(str(j) + str(k))
            if D < tmp:
                break
            if i == j * k:
                ans += 1

print(ans)

Solution (Python):
m,d=map(int,input().split())

cnt=0
for i in range(1,m+1):
    for j in range(22,d+1):
        d10=j//10
        d1=j%10
        if i==d1*d10 and d1>=2:
            cnt+=1
print(cnt)

Solution (Python):
import math

m, d = map(int, input().split())

ans = 0
for i in range(1, m+1):
    days = []
    for j in range(1, int(math.sqrt(i))+1):
        if j==1:
            continue
        if i%j==0:
            days.append(str(j)+str(i//j))
            if i//j != j:
                days.append(str(i//j)+str(j))

    for x in days:
        if int(x)<=d:
            ans += 1

print(ans)

Solution (Python):
M, D = (int(i) for i in input().split())

days = 0

for m in range(1, M+1):
    for d in range(1, D+1):
        d1 = d % 10
        d2 = d // 10
        if d1 >= 2 and d2 >= 2 and d1*d2 == m:
            days += 1

print(days)

Solution (Python):
M, D = list(map(int, input().split()))
count = 0
for month in range(1,M+1):
    for day in range(1,D+1):
        d10,d1 = divmod(day, 10)
        if (d10 >= 2) & (d1 >= 2) & (d10 * d1 == month):
            count = count + 1
print(count)

Solution (Python):
M, D = map(int, input().split())
count = 0
for i in range(1,M+1):
  for j in range(22,D+1):
    
    if j//10>=2:
      if j%10>=2:
        if (j//10)*(j%10)==i:
          count+=1
print(count)

Solution (Python):
M,D=map(int,input().split())

ans=0

if D>=22 and M>=4:
    for m in range(M+1)[4:]:
        for d in range(D+1)[22:]:
            if d//10>1 and d%10>1 and (d//10)*(d%10)==m:
                ans+=1

print(str(ans))

Solution (Python):
m,d=map(int,input().split())
if d<22:
    print(0)
    exit()
if m<4:
    print(0)
    exit()

ans=0
for i in range(1,m+1):
    for j in range(1,d+1):
        a=j//10
        b=j%10
        if a<2 or b<2:
            continue
        if a*b==i:
            ans+=1
print(ans)

Solution (Python):
M,D = map(int,input().split())
ans = 0
for m in range(4,M+1):
    for i in range(1,D+1):
        d = str(i).zfill(2)
        if int(d[0])<2 or int(d[1])<2:
            continue
        n = int(d[0])*int(d[1])
        if n == m:
            ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split())
ans = 0

for m in range(1, M + 1):
    for d in range(1, D + 1):
        d_list = divmod(d, 10)
        if d_list[0] >= 2 and d_list[1] >= 2 and d_list[0] * d_list[1] == m:
            ans += 1
print(ans)

Solution (Python):
M,D=map(int,input().split())
s=0
if M>=4 and D>=22:
    for i in range(4,M+1):
        for j in range(22,D+1):
            t=j//10
            r=j%10
            if t>=2 and r>=2:
                if t*r==i:
                    s+=1
print(s)

Solution (Python):
M, D = map(int, input().split())
ans = 0
for i in range(4, M + 1):
    for j in range(22, D + 1):
        d1, d2 = j % 10, j // 10
        if d1 >= 2 and d2 >= 2 and d1 * d2 == i:
            ans += 1

print(ans)

Solution (Python):
m,d=map(int,input().split())
if d<=21:print(0)
elif m<=3:print(0)
else:
  cnt=0
  for i in range(4,m+1):
    for j in range(22,d+1):
      if j%10<=1:continue
      if i==int(str(j)[0])*int(str(j)[1]):
        cnt+=1
  print(cnt)

Solution (Python):
m, d = map(int, input().split())
ans = 0
for i in range(1, m+1):
    days = filter(lambda x: '2' <= x[1], [str(x) for x in range(22, d+1)])
    for day in days:
        if int(day[0]) * int(day[1]) == i:
            ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split())
count = 0
for i in range(22, D+1):
    str_i = str(i)
    if int(str_i[0]) < 2 or int(str_i[1]) < 2:
        continue
    if int(str_i[0]) * int(str_i[1]) <= M:
        count += 1
print(count)

Solution (Python):
m, d = list(map(int, input().split()))

ans = 0
for i in range(1,m+1):
    for j in range(22, d+1):
        d1 = int(str(j)[1])            
        d10 = int(str(j)[0])
        if d1*d10==i and d1 >=2:
            ans += 1


print(ans)

Solution (Python):
M,D = map(int,input().split())
if D < 22:
  print(0)
  exit()
ans = 0
for i in range(22,D+1):
  d1 = i % 10
  d10 = i // 10
  if d1 >= 2 and d10 >= 2 and M >= d1 * d10:
    ans += 1
    
print(ans)

Solution (Python):
m, d = map(int, input().split())
ans = 0
for m in range(1, m + 1):
    for d in range(22, d + 1):
        d1 = d % 10
        d10 = d // 10
        if d1 < 2:
            continue
        if m == d1 * d10:
            ans += 1
print(ans)

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
M,D=map(int,input().split())
d1=int(D/10)
d2=D-d1*10
cnt=0

for i in range(M+1):
	for j in range(D+1):
		d1=int(j/10)
		d2=j-d1*10
		if d1*d2==i and d1>1 and d2>1:
			cnt+=1
			
print(cnt)

Solution (Python):
m,d = map(int, input().split())
count = 0
if d < 22:
    print(0)
else:
    for i in range(1,m+1):
        for j in range(22,d+1):
            ju = int(str(j)[-2])
            ichi = int(str(j)[-1])
            if i == ju * ichi and ichi >= 2 and ju >= 2:
                count += 1
    print(count)

Solution (Python):
M,D=(int(x) for x in input().split())
if D<=21:
    print(0)
else:
    c=0
    for n in range(22,D+1):
        d1=n%10
        d2=n//10
        if d1>=2:
            if d2>=2:
                if d1*d2<=M:
                    c=c+1
    print(c)

Solution (Python):
m, d = map(int, input().split())

ans = 0

if d > 9:
    for i in range(d - 9):
        s = str(i + 10)
        if int(s[-1]) > 1 and int(s[-2]) > 1:
            t = int(s[-1]) * int(s[-2])
            if t <= m and t != 0:
                ans += 1

print(ans)

Solution (Python):
m, d = map(int, input().split())

ans = 0

for i in range(1, m+1):
  for j in range(1, d+1):
    if j//10 == 1 or j%10 == 1:
      continue
    a = (j//10) * (j%10)
    if i == a:
      ans += 1
    
print(ans)

Solution (Python):
m, d = map(int, input().split())
r = 0
for i in range(1, m + 1):
    for j in range(1, d + 1):
        a = j % 10
        b = j // 10
        if a >= 2 and b >= 2 and a * b == i:
            r += 1
print(r)

Solution (Python):

M,D = map(int,input().split())
count = 0
for j in range(D):
    J = j+1
    s=list(str(J))
    if len(s) >= 2:
        if int(s[0]) >= 2 and int(s[1]) >= 2:
            m = int(s[0])*int(s[1])
            if m <= M:
                count+=1
                
print(count)

Solution (Python):
from collections import defaultdict


M, D = list(map(int, input().rstrip().split()))

prod_set = defaultdict(lambda: 0)
for d in range(1, D + 1):
    if d >= 10:
        d1 = d % 10
        d10 = int((d - d1) / 10)
        if d1 >= 2 and d10 >= 2:
            m = d1 * d10
            prod_set[m] += 1

res = 0
for m in range(1, M + 1):
    if m in prod_set:
        res += prod_set[m]
print(res)

Solution (Python):
m, d = map(int, input().split())
count = 0
for i in range(m):
    for j in range(d):
        day = j + 1
        if day <= 21:
            continue
        lst = []
        while day > 0:
            lst.append(day%10)
            day //= 10
        lst.reverse()
        if (lst[0] < 2) or (lst[1] < 2):
            continue
        if lst[0] * lst[1] == i + 1:
            count += 1
print(count)