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())

if M<4 or D<22:
	print(0)
else:
	cnt=0
	for i in range(4,M+1):
		for j in range(22,D+1):
			s=j//10
			t=j%10
			if s>=2 and t>=2:
				if s*t==i:cnt+=1
	print(cnt)

Solution (Python):
import sys
def main():
    input = sys.stdin.readline
    MD = list(map(int, input().split()))
    M = MD[0]
    D = MD[1]

    if D < 22:
        ans = 0
    else:
        ans = 0
        for m in range(M):
            m += 1
            for d in range(D):
                d += 1
                if d >= 22:
                    d_1 = int(str(d)[1])
                    if d_1 >= 2:
                        d_10 = int(str(d)[0])
                        if d_1 * d_10 == m:
                            ans += 1
                            
                            
                            
    print(ans)
if __name__ == '__main__':
    main()

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

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

cnt = 0
for i in range(1,m+1):
    for j in range(1,d+1):
        j_10=int(j/10)
        j_1=j-j_10*10
        
        if (j_1>=2) and (j_10>=2) and (j_1*j_10==i):
            cnt += 1
            
print(cnt)

Solution (Python):
m,d = map(int,input().split())
cnt = 0
for i in range(1,d+1):
    s = str(i)
    if len(s) ==2:
        num = int(s[0]) * int(s[1])
        if int(s[0]) >=2 and int(s[1]) >=2:
            if num <=m:
                cnt+=1
print(cnt)

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

Solution (Python):
m,d = [int(x) for x in input().split()]
print(len([i for i in range(21,d+1) if (i%10) >= 2 and 4 <= (i//10)*(i%10) <= m ]))

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

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

if D < 10:
    print(0)
    exit()

cnt = 0

for m in range(1, M + 1):
    for i in range(10, D + 1):
        Ds = str(i)
        D10 = int(Ds[0])
        D1 = int(Ds[1])
        if m == D10 * D1:
            if D1 >= 2 and D10 >= 2:
                cnt += 1

print(cnt)

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) * (j%10) == i and j//10 != 1 and j%10 != 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):
        d = j + 1
        if len(str(d)) >= 2:
            d_1 = d % 10
            d_10 = d // 10
            if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == m:
                ans += 1
print(ans)

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(12, D + 1)))

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

Solution (Python):
n,m=map(int,input().split())
ans=0
for i in range(n):
  for j in range(m):
    mo=i+1
    da=j+1
    if(da>=11):
      dd=str(da)
      if(mo==int(dd[0])*int(dd[1])):
        if(int(dd[0])>=2 and int(dd[1])>=2):
          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(1, D + 1):
    d10 = d // 10
    d1 = d - d10 * 10
    if d10 >= 2 and d1 >= 2:
      if d1 * d10 == m:
        cnt += 1
print(cnt)

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

if d < 22:
    print('0')
else:
    for i in range(22, d+1):
        s = str(i)
        if int(s[0]) < 2 or int(s[1]) < 2:
            continue
        k = int(s[0]) * int(s[1])
        if k >= 2 and k <= m:
            
            ans += 1
    print(ans)

Solution (Python):
n, m = map(int,input().split())
cnt = 0
for i in range(1,n+1):
  for j in range(1,m+1):
    if j>=22:
      str_j = str(j)
      d1 = str_j[0]
      d10 = str_j[1]
      if int(d1)*int(d10)==i and d1!='1' and d10 != '1':
        cnt+=1
print(cnt)

Solution (Python):

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

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

cand = set()
for m in range(1, M+1):
    i = 2
    while i*i <= D:
        if m % i == 0:
            ma = m//i
            mi = i
            if mi <= 1 or ma <= 1:
                pass
            elif int(str(mi)+str(ma)) <= D:
                cand.add(int(str(m)+str(mi)+str(ma)))
            elif int(str(ma)+str(mi)) <= D:
                cand.add(int(str(m)+str(ma)+str(mi)))

        i += 1
print(len(cand))

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

Solution (Python):



def main():
    m, d = map(int, input().split())
    ans = 0

    for mi in range(1, m + 1):
        for di in range(1, d + 1):
            d10 = di // 10
            d1 = di - d10 * 10

            if mi == d1 * d10 and d1 >= 2 and d10 >= 2:
                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):
    seki = 0
    for j in range(1,d+1):
        if ((j%10) >= 2) and ((j//10) >= 2):
            seki = (j%10)*(j//10)
            if seki == i:
                ans += 1
                
print(ans)

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

ans = 0
for mul in range(1, M + 1):
    for date in range(11, D + 1):
        if (date // 10) == 1 or (date % 10) in [0, 1]:
            continue
        temp = (date//10)*(date % 10)

        if temp == mul:
            ans += 1
            
print(ans)

Solution (Python):
"""
N = int(input())
A, B = map(int,input().split())
lst = [list(map(int,input().split())) for i in range(M)]
A = list(map(int,input().split()))
"""

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

if D < 10 or M < 4:
  print(0)
  exit()
  
ans = 0
for day in range(10,D+1):
  d1 = day % 10
  d10 = day // 10
  if d1 > 1 and d10 > 1:
    if d1 * d10 <= M:
      ans += 1
      
print(ans)

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

counter = 0
index = 1
while index <= m:
    index2 = 10
    while index2 <= d:
        dL = list(str(index2))
        d1 = int(dL[0])
        d10 = int(dL[1])
        if d1 >= 2 and d10>=2 and d1*d10 == index:
            counter+=1
        index2+=1
    index+=1
print(counter)

Solution (Python):
import sys

parts = sys.stdin.readline().split(' ')
m = int(parts[0])
n = int(parts[1])
ans = 0

for i in range(m):
    for j in range(n):
        d1 = (j + 1) % 10
        d2 = (j + 1) // 10
        if d1 > 1 and d2 > 1 and d1 * d2 == i + 1:
            ans += 1

print(ans)

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

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

Solution (Python):


import sys


tmp = input().split()
m,d = list(map(lambda a: int(a), tmp))



ans=0
for i in range(1,m+1):

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



print(ans)

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

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

    print(count)



resolve()

Solution (Python):
from itertools import product

M, D = map(int, input().split())
m_day = [(m, d) for m, d in product(range(1, M+1), range(22, D+1)) if int(str(d)[0]) >= 2 and int(str(d)[1]) >= 2 and m == int(str(d)[0]) * int(str(d)[1])]
print(len(m_day))

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

ans=0
for mo in range(m):
    for d in range(D+1):
        if d>=22:
            d_10=int(str(d)[0])
            d_1=int(str(d)[1])
            if d_10*d_1==mo+1 and d_10>1 and d_1>1:
                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):
    d1 = d % 10
    d2 = (d - d1)//10
    if d1 > 1 and d2 > 1 and m == d1 * d2:
      ans +=1
    
print(ans)

Solution (Python):
M,D = [int(i) for i in input().split(" ")]
s = 0
for m in range(1,M+1):
    for d in range(20,(D+1)):
        d1 = d % 10
        d2 = d//10
        if d1 * d2 == m and d1 >= 2 and d2 >= 2:
            s+=1
print(s)

Solution (Python):
def solve():
  M, D = map(int, input().split())
  ans = 0
  D1 = D // 10
  D10 = D % 10

  for m in range(1, M + 1):
    for d1 in range(2, D1 + 1):
      if m % d1 != 0: continue
      d10 = m // d1
      if 1 < d10 and d10 < 10 and (d1 != D1 or d10 <= D10): ans += 1

  return ans

print(solve())

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

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

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

def search(m,D):
    box = []
    for j in range(2,10):
        if m%j == 0 and 9 >= m/j >= 2:
            a = j*10+int(m/j)
            if a <= D:
                box.append(j*10+int(m/j))
    return box

c = 0
for m in range(1,M+1):
    box = search(m,D)
    c += len(box)

print(c)

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

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

ans = 0

for i in range(m+1):
    for j in range(d+1):
        if j //10 >= 1:
            a = j // 10
            b = j % 10
            if i == a * b and a != 1 and i != 0and b != 1:
              ans += 1
                
print(ans)

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

Solution (Python):




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


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


print(cnt)

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

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

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    M,D = map(int, input().split())
    days = set()
    for d in range(D+1):
        d_1 = d % 10
        d_10 = d // 10
        if d_1 < 2 or d_10 < 2:
            continue
        m = d_1*d_10
        day = (m,d)
        if (day not in days) and (m <= M):
            days.add(day)
    print(len(days))

if __name__ == '__main__':
    main()

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

for m in range(M+1):
    for d in range(D+1):
        if (d%10)*(d//10)==m and d%10>=2 and d//10>=2:
            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):
        d1 = d % 10
        d10 = d // 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
            ans += 1
print(ans)

Solution (Python):
from collections import defaultdict
from heapq import heappush, heappop
import math
import bisect
import random

def LI(): return list(map(int, input().split()))
def I(): return int(input())
def LIM(): return list(map(lambda x:int(x) - 1, input().split()))
def LS(): return input().split()
def S(): return input()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def LIRM(n): return [LIM() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
mod = 1000000007


m, d = LI()


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




print(cnt)

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

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

print(cnt)

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

ans = 0
for m in range(1, M+1):
    for i in range(1, 10):
        if m%i == 0 and i >= 2:
            k = m//i
            if 2 <= k <= 9 and 10*i+k <= D:
                ans += 1
print(ans)

Solution (Python):
a=input().split(" ")
M=int(a[0])
D=int(a[1])
list=[]
count=0
for p in range(4,M+1):
    list.append(p)
for q in range(22,D+1):
    d10=q//10
    d1=q-d10*10
    if d1>=2 and d10>=2:
        if d1*d10 in list:
            count+=1
print(count)

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

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 = str(j)
        if len(d) == 2:
            d1 = int(d[1])
            d10 = int(d[0])
            if d1 >= 2 and d10 >= 2 and d1 * d10 == i:
                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(1,D+1):
        if j>=22:
            d1 = int(str(j)[-1])
            d10 = int(str(j)[-2])
            if d1>=2 and d10>=2 and i==d1*d10:

                cnt += 1
print(cnt)

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

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

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

Solution (Python):
m,d=list(map(int,input().split()))
total=0
for i in range(11,d+1):
    if i//10>=2 and i%10>=2:
        tmp=(i//10)*(i%10)
        if tmp==0:
            continue
        if tmp<=m:
            total+=1
print(total)

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

ans = 0
for m in range(1, M+1):
    for d in range(20, D + 1):
        a, b = map(int, str(d))
        if b < 2:
            continue
        elif m == a*b:
            ans += 1


print(ans)

Solution (Python):
m, d = map(int, input().split())
c = 0
a = set()
for i in range(2, m):
    for j in range(2, m):
        if i * j <= m and int(str(i)+str(j)) <= d:
            a.add((i*j, i, j))
print(len(a))

Solution (Python):
def main():
    md = [int(x) for x in input().split()]
    ret = 0
    for i in range(md[0]):
        for j in range(md[1]):
            d = [(1+j) % 10, (1+j)//10]
            if d[0] >= 2 and d[1] >= 2 and d[0] * d[1] == i+1:
                
                ret += 1
    print(ret)
    return


if __name__ == "__main__":
    main()

Solution (Python):
M, D = map(int, input().split())
answer = 0
for i in range(1,M+1):
    for j in range(20, D+1):
        d_1 = j % 10
        if d_1 < 2:
            continue
        d_10 = j // 10
        if d_1 * d_10 == i:
            answer += 1
print(answer)

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

count = 0
for mi in range(4, M + 1):
    for di in range(2, D + 1):
        d1 = di % 10
        d10 = di // 10
        if d1 >= 2 and d10 >= 2 and mi == d1 * d10:
            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):
        d10, d1 = d // 10, 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(m):
    i+=1
    for j in range(d):
        j+=1
        d1=j//10
        d2=j-d1*10
        if(d1>=2 and d2>=2 and d1*d2==i):
            cnt+=1

print(cnt)

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-d1)/10
        if d1>=2 and d2 >=2 and d1*d2 == i:
            ans+=1
print(ans)

Solution (Python):
M, D = map(int,input().split())
c = 0
for d in range(20,D+1):
    s = str(d)
    if (1<int(s[0])*int(s[1])<=M and int(s[0]) > 1 and int(s[1]) > 1):
        c += 1
print(c)

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

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

print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7


def LI():
    return list(map(int, sys.stdin.readline().split()))


def II():
    return int(sys.stdin.readline())


def LS():
    return list(map(list, sys.stdin.readline().split()))


def S():
    return sys.stdin.readline()[:-1]


def main():
    m, d = LI()
    ans = 0
    for i in range(2, m + 1):
        for j in range(2, d + 1):
            if j < 20:
                continue
            jj = int(j / 10)
            jjj = j - 10 * jj
            if jjj < 2:
                continue
            if i == jj * jjj:

                ans += 1
    print(ans)


if __name__ == "__main__":
    main()

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>=20 and j%10>=2:
            if (j%10)*((j-j%10)//10)==i:
                count+=1
print(count)

Solution (Python):
m,d=map(int,input().split())
flag=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 and int(str(j)[0])*int(str(j)[1])==i:
    flag+=1
print(flag)

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

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

ans = 0
for di in range(11, D + 1):
    d10 = di // 10
    d1 = di % 10
    if d10 < 2: continue
    if d1 < 2: continue
    
    if 1 <= (d1 * d10) <= M:
        
        ans += 1

print(ans)

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

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

if __name__ == "__main__":
    f_a()

Solution (Python):
import bisect
from collections import deque
import sys
MAX_INT = int(10e9)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

M,D = IL()

cnt = 0
for m in range(1,M+1):
  d2 = 0
  for d in range(20,D+1):
    d1 = str(d)[-1]
    d10 = str(d)[-2]
    if (int(d1) >= 2) and (int(d10) >= 2) and (int(d1)*int(d10) == m):
      cnt += 1

print(cnt)

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


ls = []
for i in range(2,10):
    for j in range(2,10):
        if i*10+j <= D:
            ls.append((i*j,i,j))
ls = list(sorted(ls))
r = []
for lls in ls:
    if lls[0] > M:
        break
    r.append(lls)

print(len(r))

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

ans = 0
if(D < 20):
    print(0)
    sys.exit()

for i in range(1,M+1):
    for j in range(20,D+1):
        d10 = j//10
        d1  = j%10
        if(d1 < 2):
            continue
        elif(i == d10 * d1):
            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(min(22, d), d + 1):
        if j // 10 * (j % 10) == i and j % 10 > 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):
        d = '%02d'%(j)
        d_1 = int(d[1])
        d_10 = int(d[0])
        if d_1 >=2 and d_10 >=2 and d_1 * d_10==i:
            count += 1
print(count)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    M, D = [int(i) for i in input().split()]
    cnt = 0
    for m in range(2, M + 1):
        for d in range(22, D + 1):
            d_one = d % 10
            d_ten = d // 10
            if d_one < 2 or d_ten < 2:
                continue
            if m == d_one * d_ten:
                cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

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

Solution (Python):
M,D = map(int,input().split())
ans = 0
for j in range(M):
  L = j + 1
  for i in range(D):
    K = i + 1
    if K > 9:
      P = str(K)
      if int(P[0]) != 1 and int(P[1]) != 1:
        if int(P[0])*int(P[1]) == L:
          
          ans += 1
print(ans)

Solution (Python):

def main():
    m, d = map(int, input().split(" "))
    count = 0
    for m in range(1, m+1):
        for day in range(1, d+1):
            d1 = day % 10
            d10 = (day - d1) // 10
            if d1>=2 and d10 >=2 and d1*d10==m:
                count += 1

    print(count)

main()

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

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

ans = 0
if(d > 21):
    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 > 1):
                if (d1 * d10 == i):
                    ans+=1
                        
print(ans)

Solution (Python):
M, D = [int(x) for x in input().split(' ')]
ret = 0

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

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

ans = 0

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


print(ans)

Solution (Python):
M, D = [int(x) for x in input().split()]
ret = 0
for m in range(1, M+1):
  for d10 in range(2, 10):
    for d1 in range(2, 10):
      d = 10 * d10 + d1
      if d > D:
        break
      if d1 * d10 == m:
        ret += 1
    if d10 > D:
      break
print(ret)

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

cnt = 0
for iM in range(1, M+1):
    for iD in range(1, D+1):
        d1 = iD % 10
        d10 = iD // 10
        if d1 == 1 or d10 == 1:
            continue
        if d1 * d10 == iM:
            cnt += 1
print(cnt)

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

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

ans = 0
for d in range(22,D+1):
    d10 = d // 10
    d1 = d % 10

    if d10 >= 2 and d1 >= 2:
        if d1 * d10 <= M:
            ans += 1

print(ans)

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

Solution (Python):
md = input().split(" ");
m = int(md[0]);
d = int(md[1]);

ans = 0;

for i in range(1,m+1) :
	for j in range(1,d+1) :
		one = j % 10;
		ten = j // 10;
		if ten >= 2 and one >= 2 and ten * one == i :
			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(1, d + 1):
        
        if j % 10 >= 2 and (j // 10) >= 2 and j % 10 * (j // 10) == i:
            cnt += 1
print(cnt)

Solution (Python):
import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

a, b = readmi()

su = 0
for i in range(1, a + 1):
    for j in range(10, b + 1):
        t = str(j)
        tt = list(t)
        if int(tt[0]) >= 2 and int(tt[1]) >= 2:
            if i == int(tt[0]) * int(tt[1]):
                su += 1
print(su)

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

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

Solution (Python):
M, D  = [int(v) for v in raw_input().split()]
p = 0
for m in range(1, M+1):
    for d in range(22, D + 1):
        d1 = d %10
        d10 = (d //10) % 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
            p += 1
           
print(p)

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

print(ans)

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

res = 0
for m in range(1,M+1):
    for d in range(10,D+1):
        d = str(d)
        c = 1
        for x in d:
            x = int(x)
            if x < 2:
                x = 0
            c *= x
        if c == m:
            res += 1
print(res)

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

c = 0
for i in range(1, M + 1):
    for j in range(1, D + 1):
        D01 = j % 10
        D10 = j // 10
        if D01 >= 2 and D10 >= 2:
            if D01 * D10 == i:
                c += 1

print(c)

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

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

print(cnt)

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

product = 0

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

print(product)

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

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

def is_seki(m, dd):
    d1 = dd % 10
    d10 = dd // 10
    return all([d1 >= 2, d10 >= 2, d1 * d10 == m])

res = 0
for m in range(1, M+1):
    for dd in range(1, D+1):
        if is_seki(m, dd):
            res += 1

print(res)