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):
m, d = map(int, input().split())
d10 = d // 10
d1 = d - d10
ans = 0
for i in range(1,m+1):
    for j in range(1, d + 1):
        j = str(j).zfill(4)
        j1 = int(j[-1])
        j10 = int(j[-2])
        if j1 >= 2 and j10 >= 2 and j1 * j10 == i:
            ans+=1
print(ans)

Solution (Python):
M,D =map(int,input().split())
count=0
for j in range(M+1):
    for i in range(D+1):
        left=i//10
        right=i%10
        seki=left*right

        if left >=2 and right >= 2:
            if seki == j:
                count += 1
print(count)

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

ans = 0

for j in range(i[0]):
    for k in range(i[1]):
        k += 1
        if len(str(k)) >= 2:
            k = str(k)
            if (int(k[-1])>=2)and(int(k[-2])>=2):
                if j+1 == int(k[-1])*int(k[-2]):
                    
                    ans += 1
            k = int(k)
        k -= 1

        
print(ans)

Solution (Python):
M, D = map(int,input().split())
count = 0
for i in range(22, D+1):
    l = [int(x) for x in list(str(i))]
    if l[1] == 0 or l[1] == 1:
        pass
    elif l[0] * l[1] <= M:
        count += 1

print(count)

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

for i in range(1, int(M) + 1):
    for k in range(20, int(D) + 1):
        if i == (k // 10) * (k % 10)  and k % 10 >= 2:
            output += 1

print(output)

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

ans = 0

for _m in range(m):
  _m += 1
  for _d in range(d):
    _d += 1
    if _d >= 22:
      d1 = int(str(_d)[0])
      d2 = int(str(_d)[1])
      if d2 < 2:
        continue
      if _m == d1 * d2:
        ans += 1
print(ans)

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

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

Solution (Python):


if __name__ == '__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>=10:
                d_ = str(d)
                D10 = int(d_[0])
                D1 = int(d_[1])
                D_ = D10 * D1
                if m == D_ and D10>=2 and D1>=2:
                    count += 1
                else:
                    D_ = 0

    print(count)

Solution (Python):
M, D = map(int, input().split(" "))
counter = 0
for i in range(1, M+1):
    for j in range(11, D+1):
        if int(str(j)[0])>=2 and int(str(j)[1])>=2:
            if i == int(str(j)[0]) * int(str(j)[1]):
                counter += 1
            else:
                counter += 0
print(counter)

Solution (Python):
m,d = map(int, input().split(' '))
mlist = list(range(m+1))
c = 0
for _d in range(d+1):
	d1 = _d // 10
	d0 = _d % 10
	if d1 > 1 and d0 > 1 and d1*d0 in mlist:
		c+=1
print(c)

Solution (Python):
month, day = input().split(" ")
month = int(month)
day = int(day)

num_d = 0
for m in range(2,month+1):
    for d10 in range(2,10):
        for d1 in range(2,10):
            if d10*d1 == m and d10*10+d1 <= day:
                num_d += 1

print(num_d)

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

for i in range(1,m+1):
    for j in range(22,d+1):
        d1,d2=map(int,str(j))
        if i==(d1*d2) and d2>=2:
            count+=1
            
print(count)

Solution (Python):


import sys
input = sys.stdin.readline

M,D = map(int, input().split())
ans = 0
for i in range(1, M+1):
    for j in range(22, D+1):
        a = int(str(j)[0])
        b = int(str(j)[1])
        if a >= 2 and b >= 2:
            if a * b == i:
                ans += 1

print(ans)

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

Solution (Python):
import math

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

cnt = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        a = d//10
        b = d - a*10
        if a>=2 and b>=2 and a*b == m:
            cnt += 1

print(cnt)

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

cnt = 0

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

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

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

ans = 0

for i in range(a+1):
  for j in range(b+1):
    if len(str(j)) == 2 and i >= 2 and int(str(j)[1]) >= 2 and int(str(j)[0]) >= 2:
      if i == int(str(j)[0]) * int(str(j)[1]): 
        ans += 1

print(ans)

Solution (Python):
m, d = map(int, input().split())
day_li = [i for i in range(1, d + 1)]
month_li = [j for j in range(1, m + 1)]

ans = 0
for k in day_li:
    if k >= 10:
        if int(str(k)[0]) * int(str(k)[1]) in month_li and int(str(k)[0]) >= 2 and int(str(k)[1]) >= 2:
            ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split())
c = 0
for m in range(1,M+1):
  for d in range(22, D+1):
    dl = list(str(d))
    if int(dl[0]) != 0 and int(dl[0]) != 1 and int(dl[1]) != 0 and int(dl[1]) != 1:
      if int(dl[0]) * int(dl[1]) == m:
        c += 1
      
print(c)

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 i == (j//10)*(j%10) and j//10!=1 and j%10!=1:
            ans += 1
print(ans)

Solution (Python):
m, d = map(int , input().split())
count = 0
for month in range(1,m+1):
    for i in range(2, 10):
        if month % i == 0:
            div = month // i
            if 1< div < 10 :
                if i*10+div <= d:
                    count += 1
print(count)

Solution (Python):
m, d = map(int, input().split())
ans = 0
if d < 10:
  print(0)
  exit()
for i in range(10, d+1):
  a, b = map(int, str(i))
  if a * b <= m and a >= 2 and b >= 2:
    ans += 1

print(ans)

Solution (Python):
import numpy as np
import sys
from functools import lru_cache

def main():
    (m,d) = map(int, input().split(' '))
    ret = 0
    mlist = [i+1 for i in range(m)]
    for i in range(22,d+1):
        d10,d1 = divmod(i,10)
        if d10 == 1 or d1 == 1:
            continue
        if d10*d1 in mlist:
            ret += 1


    
    print(ret)
        





if __name__ == '__main__':
    main()

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

Solution (Python):
m,d = map(int,input().split())
count = 0
if d>21:
	for i in range(d-21):
		b = int((i+22)/10)
		a = (i+22)-(b*10)
		if a>1 and b>1:
			if m >= (a*b):
				count += 1
	print(count)
else:
	print(0)

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

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

cnt=0
if d >=22:
    for i in range(22,d+1):        
        if int(str(i)[1])==1 or int(str(i)[1])==0:
            continue
        else:
            for j in range(1,m+1):
                if int(str(i)[1])*int(str(i)[0])==j:
                    
                    cnt+=1
    print(cnt)
else:
    print("0")

Solution (Python):


M, D = list(map(int, input().split()))
counter = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d = str(d)
        if len(d) != 2:
            continue
        else:
            d1 = int(d[0])
            d2 = int(d[1])
            if d1 >= 2 and d2 >= 2 and m == d1*d2:
                counter += 1

print(counter)

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

Solution (Python):
import sys

M, D = map(int,input().split())
c_list = []
m_list = []

if D>=22:
    for k in range(22,D+1):
        k_str = str(k)
        d10 = int(k_str[0])
        d1  = int(k_str[1])
        m = d10*d1
        if d1>=2:
            m_list.append(m)

else:
    print(0)
    sys.exit()

for i in range(M+1):
    c = m_list.count(i)
    c_list.append(c)

print(sum(c_list))

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

a=0
if d>=22:
    for i in range(d-21):
        day=d-i
        d1=int(str(day)[1])
        d10=int(str(day)[0])
        if int(str(day)[1])!=1:
            if d1*d10<=m and d1!=0:
                
                a+=1

print(a)

Solution (Python):
def takahashi_cal(m: int, d: int) -> int:
    res = 0
    for mm in range(1, m + 1):
        for dd in range(1, d + 1):
            d1 = dd % 10
            d10 = dd // 10
            if any([d1 < 2, d10 < 2]):
                continue
            if d1 * d10 == mm:
                res += 1
    return res
    
m, d = input().split(" ")
print(takahashi_cal(int(m), int(d)))

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

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

Solution (Python):
m, d = map(int, input().split())
answer = [0 for day in filter(lambda x: x // 10 > 1 and x % 10 > 1, range(1, d + 1)) if 1 <= ((day // 10) * (day % 10)) <= m]
print(len(answer))

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

ans = 0

for m in range(1, M+1):
    for d in range(1, D+1):
        if d >= 10:
            d_1 = str(d)[-1]
            d_10 = str(d)[-2]
            if int(d_1) * int(d_10) == m and int(d_1) >= 2 and int(d_10) >= 2:
                ans += 1
        else:
            continue

print(ans)

Solution (Python):
def hantei(m, d):
    d1 = d//10
    d2 = d % 10

    if d1 > 1 and d2 >1:
        if d1*d2 == m:
            return 1
        else:
            return 0
    else:
        return 0



M, D = map(int, input().split(' '))
cnt = 0
if D > 20:
    for m in range(1, M + 1):
        for d in range(21, D + 1):
            if hantei(m, d) == 1:
                cnt += 1
print(cnt)

Solution (Python):
m,d=map(int,input().split())
cnt = 0
for i in range(22,d+1):
    d1=int(str(i)[0])
    d2=int(str(i)[1])
    if d2>1:
        if d1*d2 <= m:
          cnt += 1
print(cnt)

Solution (Python):


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

    x = sum(max(1, min(9, M//a))-1 for a in range(2, D//10))

    if D >= 10:
        x += max(1, min(min(9, D%10), M//(D//10) )) - 1
        
    
    print(x)

if __name__ == '__main__':
    main()

Solution (Python):

M, D = map(int,input().split())
count = 0
for k in range(4, M+1):
    for i in range(22, D+1):
        if i // 10 >= 2 and i % 10 >= 2:
            if k == (i//10)*(i % 10):
                count = count + 1
            else:
                pass
        else:
            pass
print(count)

Solution (Python):
from functools import reduce
M, D = map(int, input().split())


count = 0
for m in range(1, M+1):
    for d in range(12, D+1):
        if '1' in str(d):
            continue
        elif reduce(lambda x, y: x*y, map(int, list(str(d)))) == m:
            count += 1
print(count)

Solution (Python):
def check(m,d1,d10):
    if d1 < "2" or d10 < "2":
        return False
    if int(d1)*int(d10) == m:
        return True
    return False

M,D = map(int,input().split())
count = 0
for m in range(1,M+1):
    for d in range(1,D+1):
        d = str(d)
        if len(d) == 1:
            d = "0"+d
        if check(m,d[1],d[0]):
            count += 1
print(count)

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

D = int(D)
ans = 0

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


print(ans)

Solution (Python):
m, d2 = map(int, input().split())
count = 0
for m in range(1,m+1):
    for d in range(1,d2+1):
        d = str(d)
        if len(d) < 2:
            continue
        d1 = int(d[1])
        d10 = int(d[0])
        if d10 >= 2 and d1 >= 2 and d10 * d1 == m:
            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):
		if int(str(j)[0]) >=2 and int(str(j)[1]) >=2 and i == int(str(j)[0]) * int(str(j)[1]):
			ans += 1

print(ans)

Solution (Python):
a=[]
for x in input().split(" "):
    a.append(int(x))
b=a[0]
c=a[1]
d=[]
i=0
c=str(a[1])
for x in c:
    d.append(int(x))
m=1
da=1
dal=[]
while m<=a[0]:
    while da<=a[1]:
        for x in str(da):
            if len(str(da))==1:
                dal=[0,int(x)]
            else:
                dal.append(int(x))
        if dal[0]*dal[1]==m and dal[0]>=2 and dal[1]>=2:
            i+=1
        da+=1
        dal=[]
    m+=1
    da=0
print(i)

Solution (Python):
import sys

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

if M < 4 or D < 22:
  print('0')
  sys.exit()

  
for i in range(4,M + 1):
  for j in range(22, D + 1):
    str_j = str(j)
    d_t = int(str_j[-2])
    d_o = int(str_j[-1])
    if d_o < 2:
      continue
    if i == d_t * d_o:
      Ans = Ans + 1

print(Ans)

Solution (Python):
M, dd= map(int, input().split())
cnt=0
for i in range(1, M+1):
    for j in range(1, dd+1):
        dten = j //10
        done = j %10
        if dten >= 2 and done >=2 and done*dten ==i:
            cnt+=1
print(cnt)

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

cnt=0

for i in range(4,m+1):
    for j in range(2,i+1):
        if i%j==0 and i%(i//j)==0 and i>1 and i//j>1:
            tmp=int(str(j)+str(i//j))
            if tmp<=d:
                cnt+=1
print(cnt)

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

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

result = 0
for i in range(22, d+1):
	d10 = i // 10
	d1 = i % 10
	if d1 < 2:
		continue
	if d1 * d10 <= m and d1 * d10 != 0:
		result += 1

print(result)

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

count = 0

d = [ m for m in range(22, D+1) if int(str(m)[1])>=2 ]

m = list(range(1, M+1))

for x in d:
    if int(str(x)[0])*int(str(x)[1]) in m:
        count += 1

print(count)

Solution (Python):


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


if __name__ == '__main__':
    solve()

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

cnt = 0
for m in range(1, M + 1):
    for d in range(21, D + 1):
        a = d // 10
        b = d % 10
        if b < 2:
            continue

        if a * b == m:
            cnt += 1

print(cnt)

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

for month in range(1, m+1):
	for day in range(1, d+1):
		if len(str(day)) >= 2:
			if int(str(day)[0]) >= 2 and int(str(day)[1]) >= 2 and int(str(day)[0]) * int(str(day)[1]) == month:
				ans += 1

print(ans)

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

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

sekiday=0
for i in range(2,M+1):
  for j in range(2,D+1):
    d1=j%10
    d2=j//10
    if i==d1*d2 and min(d1,d2)!=1:

      sekiday+=1

print(sekiday)

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

cnt = 0
for m in range(1, M+1):
  for d in range(22, D+1):
    d1 = int(d/10)
    d2 = d%10
    if d1 < 2 or d2 < 2:
      continue
    if m == d1*d2:
      cnt += 1

print(cnt)

Solution (Python):
num_month, day_per_month = map(int, input().split(' '))

ans = 0
for month in range(4, num_month+1):
    ans += len([day for day in range(22, day_per_month+1)
                if day // 10 >= 2 and day % 10 >= 2 and (day // 10) * (day % 10) == month])

print(ans)
exit(0)

Solution (Python):
from sys import stdin


def main():
    M, D = [int(x) for x in stdin.readline().rstrip().split()]

    sum = 0

    for d in range(11, D+1):
        d_10, d_1 = str(d)

        if int(d_10) > 1 and int(d_1) > 1:
            if M >= int(d_10) * int(d_1):
                sum += 1

    print(sum)


if __name__ == "__main__":
    main()

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

Solution (Python):
m,d = map(int, input().split())
count=0
for i in range(m+1):
  for k in range(d+1):
    if k < 21 :
      pass
    elif int(str(k)[1]) < 2:
      pass
    else:
      if int(str(k)[0])*int(str(k)[1]) == i:
        count += 1
print(count)

Solution (Python):
import numpy as np

I=np.array(input().split(),dtype=np.int32)

M=I[0]
D=I[1]

count=0

def check(d,m):
    d10=int(d[0])
    d1=int(d[1])
    if(d10>=2 and d1>=2 and m==d10*d1):
        return True
    return False

for m in range(1,M+1):
    for d in range(22,D+1):
        if(check(str(d),m)):
            count+=1

print(count)

Solution (Python):
List = list(map(int,input().split()))
M = List[0]
D = List[1]
count = 0
for a in range(1,M+1):
	for b in range(1,D+1):

		d_10 = int(b/10)
		d_1 = int(b - 10 * d_10)

		if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == a:
			count += 1

print(count)

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

Solution (Python):
import math
m,d = map(int,input().split())
count = 0
for i in range(m+1):
  for j in range (d+1):
    d_10 = math.floor(j/10)
    d_1 = j-10*d_10
    if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == i:
      count += 1
print(count)

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


SUM = 0
for m in range(4, int(M)+1) :
    for d in range(22, int(D)+1) :
        if ( int(d % 10) ) * ( int(d / 10) ) == m \
            and int(d % 10) != 1 and int(d / 10) != 1:
            SUM+=1
        
print(SUM)

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

cnt = 0

for i in range(1, m+1):
    for j in range(22,d+1):
        if int(str(j)[1]) > 1:
            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):
    for j in range(1,d+1):
        d_1 = j%10
        d_10 = (j-(j%10))//10
        if (d_1>=2) and (d_10>=2) and (d_1*d_10==i):
            ans+=1

print(ans)

Solution (Python):
def A():
    temp = input().split()
    M = int(temp[0])
    D = int(temp[1])

    if D<22:
        print(0)
        return
    
    ans = 0

    for i in range(1, M+1):
        for j in range(22, D+1):
            if (j%10) >= 2 and (j%10)*int(j/10) == i:
                ans += 1
    
    print(ans)

A()

Solution (Python):
M, D = map(int, input().split())
w = str(D)
ans = 0
if len(w) == 2:
    d2 = str(w[0])
    d1 = str(w[1])
else:
    print(ans)
    exit()

for m in range(1, M+1):
    for a in range(1, int(d2)+1):
        for b in range(10):
            if a == int(d2) and int(d1) < b:
                continue
            if m == a * b and a >= 2 and b >= 2:
                ans += 1

print(ans)

Solution (Python):
import sys, math
from collections import deque

readline = sys.stdin.readline

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

count = 0
for m in range(1, M + 1):
    for d in range(2, D + 1):
        dstr = str(d)
        if len(dstr) != 2:
            continue
        d1 = int(dstr[1])
        d2 = int(dstr[0])
        if d1 < 2 or d2 < 2:
            continue
        if d1 * d2 == m:
            count += 1


print(count)

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

print(ans)

Solution (Python):

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

dates = [i for i in range(1, d+1) if i>=22 and i%10>1]

count=0
for date in dates:
  d1,d2 = str(date)
  d1 = int(d1)
  d2 = int(d2)
  if d1*d2<=m:
    count+=1
print(count)

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

M = int(m)
D = int(d)
count = 0
for i in range(1, M + 1):
    for j in range(1, D + 1):
        if j < 10:
            continue
        else:
            d1 = int(j % 10)
            d10 = int(j / 10)
            if d1 < 2 or d10 < 2:
                continue

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

print(count)

Solution (Python):
import sys


def main():
    m, d = [int(s) for s in sys.stdin.readline().strip().split()]

    ans = 0
    for month in range(1, m+1):
        for day in range(22, d+1):
            if (day % 10) > 1 and (day // 10) > 1:
                if (day % 10) * (day // 10) == month:
                    ans += 1
    print(ans)


main()

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

"""
d10 = D // 10
d1  = D %  10
ans = 0

for i in range(2,d10+1):
    for j in range(2,d1+1):
        if i*j <= M:
            ans += 1
"""
ans = 0
for d in range(D+1):
    d10 = d // 10
    d1 = d % 10
    if d10 * d1 <= M:
        if d10 >= 2 and d1 >= 2:
            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>=10:
			if i == (int(list(str(j))[0])*int(list(str(j))[1])):
				if int(list(str(j))[0]) >1 and int(list(str(j))[1]) >1:
					count +=1	
print(count)

Solution (Python):
M,D = list(map(int,input().split()))
ans = 0
for m in range(1,M+1):
  for d in range(1,D+1):
    if d < 11:
      continue
    d1,d2 = map(int,list(str(d)))
    if d1*d2 == m and d1 != 1 and d2 != 1:
      ans += 1
print(ans)

Solution (Python):
inStr = input().split()
M = int(inStr[0])
D = int(inStr[1])

count = 0

for i in range(1, M+1):
  for j in range(1,D+1):
    q, mod = divmod(j, 10)
    if q >= 2 and mod >= 2:
      if i == q * mod:
        count += 1
print(count)

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

Solution (Python):
m,d=map(int,input().split())
if d<=21:
  print(0)
  exit()
hi=0
for month in range(1,m+1):
  for day in range(22,d+1):
    day_str=str(day)
    d1=int(day_str[1])
    d10=int(day_str[0])
    if d1==1 or d10==1:
      continue
    if d1*d10==month:
      hi+=1
print(hi)

Solution (Python):
M,D= list(map(int, input().split()))
ans=0
for i in range(M):
    for j in range(22,D+1):
        if str(j)[1]=='0' or str(j)[1]=='1':
            continue
        elif i+1==int(str(j)[0])*int(str(j)[1]):
            ans+=1
print(ans)

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

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

count = 0
for month in range(1, m+1):
    for day in range(22, d+1):
        str_day = str(day)
        d1 = int(str_day[0])
        d2 = int(str_day[1])
        if d1 <= 1 or d2 <=1:
            continue
        if d1 * d2 == month:
            count += 1
print(count)

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

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

print(ans)

Solution (Python):
m, d = [int(i) for i in input().split()]
counter = 0
for i in range(1, m + 1):
    for j in range(2, 10):
        for k in range(2, 10):
            day = 10 * j + k
            if day > d:
                continue
            if i == j * k:
                counter += 1
print(counter)

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def s_list(): return list(input())
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]
def mi(n): return [wi() for _ in range(n)]
def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def grid(n): return [s_list() for _ in range(n)]

m, d = wi()

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

Solution (Python):
def resolve():
    M,D=map(int,input().split())
    count=0
    for j in range(1,M+1):
        for i in range(1,D+1):
            if i<10: continue
            s1=int(str(i)[0])
            s2=int(str(i)[1])
            if s1>1 and s2>1:
                if s1*s2==j:
                    count+=1
    print(count)
resolve()

Solution (Python):

M,D = map(int,input().split())
cnt = 0
for m in range(2,M+1):
    for i in range(2,10):
        if m%i == 0:
            day = m//i
            if day < 10:
                if day > 1:

                    if (i + 10*day) <= D:

                        cnt += 1



print(cnt)

Solution (Python):
input_data = input().split(" ")
M = int(input_data[0])
D = input_data[1]

cnt = 0
for i in range(1,M + 1):
  for j in range(22, int(D) + 1):
    if i == int(str(j)[0]) * int(str(j)[1]) and int(str(j)[1]) != 0  and int(str(j)[1]) != 1:
      cnt += 1
    else:
      pass

print(cnt)

Solution (Python):
ori_month, ori_day = map(int, input().split())

def p_day_check(month, day):
    d1 = day % 10
    d10 = day // 10
    if d1 >= 2 and d10 >= 2 and d1 * d10 == month:
        return True
    else:
        return False

product_day = 0

for month in range(1, ori_month+1):
    for day in range(1, ori_day+1):
        if p_day_check(month, day):
            product_day += 1

print(product_day)

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 :
            buf = str(j)
            d_1 = int(buf[-1])
            d_10 = int(buf[-2])

            if d_1 >= 2 and d_10 >= 2 and int(d_1 * d_10) == i:
                ans += 1
print(ans)

Solution (Python):
M, D = map(int, input().split(" "))
cnt = 0
for m in range(1, M + 1):
    for d in range(10, D + 1):
        ds = str(d)
        d1, d10 = int(ds[1]), int(ds[0])
        if d1 * d10 == m and d1 >= 2 and d10 >= 2:
            cnt += 1

print(cnt)

Solution (Python):
 

M, D = map(int, input().split())
result =0
for i in range(4,M+1):
    for j in range(22, D+1):
        d1 =(j % 10)
        d2 =(j // 10)
        if d1 <2 or d2<2 or (d1*d2!=i):
            continue
        result += 1
print(result)

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

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

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

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

	dic = {}
	for row in range(11, D+1):
		if int((row%10)) < 2 or int((row/10)) < 2:
			continue
		num = int((row%10))*int((row/10))
		if num in dic:
			dic[num] += 1
		else:
			dic[num] = 1
	
	counter = 0
	for key in range(M+1):
		if key in dic:
			counter += dic[key]
	
	print(counter)


if __name__ == "__main__":
	main()

Solution (Python):

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

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

print(cnt)

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

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