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

Solution (Python):
M, D = map(int, input().split())
ans = 0
for m in range(1, M+1):
    for d in range(22, D+1):
        d_10, d_1 = divmod(d, 10)
        if d_10 > 1 and d_1 > 1 and d_10*d_1==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):
    if d % 10 > 1 and d // 10 > 1:
      ans += 1 if (d % 10) * (d // 10) == m else 0
print(ans)

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
        d10 = j // 10
        if d1 > 1 and d1*d10 == i:
            ans += 1

print(ans)

Solution (Python):
def d10(n):
    return n//10
def d1(n):
    return n%10
def sekinohi(m, d):
    return d1(d)>=2 and d10(d)>=2 and m==d1(d)*d10(d)

ans = 0
m, d = map(int, input().split())
for i in range(1, m+1):
    for j in range(1, d+1):
        if sekinohi(i, j):
            ans += 1
print(ans)

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

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

        d10 = j//10
        d1 = j-d10*10
        if d10 > 1 and d1 > 1 and i == d10*d1:
            ans += 1
print(ans)

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

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

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

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

print(ans)

Solution (Python):
def main():
    import sys
    import bisect
    from itertools import accumulate

    m, d = map(int, input().split())
    if d < 22:
        print(0)
        return

    count = 0
    for i in range(22, d + 1):
        d1 = int(str(i)[1])
        d10 = int(str(i)[0])

        x = d1 * d10
        if 1 <= x <= m and d1 >= 2:
            count += 1
    print(count)


if __name__ == '__main__':
    main()

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):
        len_1 = int(str(j)[0])
        len_2 = int(str(j)[1])
        if len_1 >= 2 and len_2 >= 2 and len_1 * len_2 == i:
            ans += 1
print(ans)

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


def isSEKIDay(m, d):
    ds = str(d).zfill(2)
    d1 = int(ds[1])
    d10 = int(ds[0])
    return (d1 >= 2) and (d10 >= 2) and (d1 * d10 == m)


cnt = 0
for i in range(M):
    for j in range(D):
        if isSEKIDay(i + 1, j + 1):
            cnt += 1

print(cnt)

Solution (Python):

from collections import Counter
def inputlist(): return [int(i) for i in input().split()]

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

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

ans = 0
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):
M, D = map(int, input().split())
cnt = 0
for m in range(1, M + 1):
    for dd in range(1, D + 1):
        if dd < 10:
            continue
        d1 = dd % 10
        d2 = (dd - d1) // 10
        if d1 > 1 and d2 > 1 and d1 * d2 == m:
            cnt += 1
print(cnt)

Solution (Python):
m,d=map(int,input().split())
ans=0
for i in range(1,d+1):
    a,b=i%10,i//10
    if a>=2 and b>=2 and a*b>1 and a*b<=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):
        d1 = d % 10
        d10 = d //10
        if d1 >= 2 and d10 >= 2 and d1*d10 == m:
            ans += 1
print(ans)

Solution (Python):
A,B = map(int, input().split())
count = 0
for i in range(4,A+1):
  for j in range(22,B+1):
    C = str(j)
    if i == int(C[0])*int(C[1]) and int(C[1]) > 1:
      count = count + 1
print(count)

Solution (Python):
def main():
    month, day = map(int, input().split())
    answer = 0
    for m in range(1, month + 1):
        for d in range(1, day + 1):
            if (d % 10) * (d // 10) == m and (d % 10) > 1 and (d // 10) > 1:
                answer += 1
    print(answer)


if __name__ == '__main__':
    main()

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

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==d10*d1 and d1>=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(20, d+1):
        s = str(j)
        d10 = int(s[0])
        d1 = int(s[1])
        if d1 == 1 or d10 == 1:
            continue
        elif i == d1 * d10:
            
            ans += 1
print(ans)

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

Solution (Python):
def divisor(n):
    tank = []
    for i in range(1, int(n**0.5)+1):
        if n%i==0:
            tank.append((i, n//i))
    return tank

m,d = map(int,input().split())
cnt = 0
for i in range(1,m+1):
    k = divisor(i)
    for x,y in k:
        a = int(str(x)+str(y))
        if a//10>=2 and a%10>=2 and a<=d:
            cnt += 1
        if x!=y:
            b = int(str(y)+str(x))    
            if b//10>=2 and b%10>=2 and b<=d:
                cnt += 1
print(cnt)

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

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

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

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

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

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

print(ans)

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

ans = 0
for i in range(22, d+1):
    d10 = i // 10
    d1 = i - d10 * 10
    if d10 > 1 and d1 > 1 and d10 * d1 <= m:
        ans += 1
print(ans)

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

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

for i in range(22, int(D)+1):
    s = str(i)
    if(int(s[0])*int(s[1]) <= int(M)):
        cnt += 1
        if(int(s[1])<= 1):
            cnt -= 1
print(cnt)

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

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

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

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

for i in range(m):
  for j in range(d):
    month = i + 1
    days = j + 1
    ten_day = days //  10
    one_day = days - ten_day*10
    
    if one_day >= 2 and ten_day>= 2 and month == ten_day * one_day:
      count += 1
      
print(count)

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

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

if D<=21:
    print(0)
    exit()
ans=0
for i in range(4,M+1):
    for j in range(22,D+1):
        D1=int(str(j)[0])
        D2=int(str(j)[1])
        if i==D1*D2 and D1!=1 and D2!=1:
            ans+=1
            
print(ans)

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

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


if __name__ == '__main__':
    main()

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

Solution (Python):






from sys import stdin,setrecursionlimit










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

m,d=map(int,input().split())
ans=0
for i in range(1,m+1):
    for j in range(1,d+1):
        s=str(j)
        if len(s)>=2:
            o,t=int(s[0]),int(s[1])
            if o>=2 and t>=2 and o*t==i:
                
                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(10, D + 1):
        d_1 = d % 10
        d_10 = d //10
        count += (d_1 * d_10 == m and d_1 > 1 and d_10 > 1)

print(count)

Solution (Python):
import math
M,D=map(int,input().split())
days=[]
count = 0
divisors = []
for k in range(1,M+1):
    for i in range(22,D+1):
        if int(str(i)[0])>=2 and int(str(i)[1])>=2:
            if k==int(str(i)[0])*int(str(i)[1]):
                count += 1
print(count)

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

        
print(cnt)

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

Solution (Python):
m, d = map(int, input().split())
D = [str(i) for i in range(1,d+1)]
c = 0

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

print(c)

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

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

Solution (Python):
import sys
import math
from collections import deque
input = sys.stdin.readline
M, D = map(int,input().split())
ans = 0
for i in range(1, D+1):
    for l in range(1, M+1):
        if int(str(i)[0]) >= 2 and int(str(i)[-1]) >= 2 and len(str(i)) >= 2 and l == int(str(i)[0])*int(str(i)[-1]):
            ans += 1
print(ans)

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

for i in range(b+1):
    if i >= 22 and i%10>=2:
        l.append((i//10)*(i%10))
l.sort()
ans = 0
for i in l:
    if a >= i: ans+=1
print(ans)

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

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

ans = 0
for i in range(4, m+1):
    for j in range(22, d+1):
        d_0 = j % 10
        d_10 = j // 10
        if d_0 == 1 or d_10 == 1:
            continue
        if d_0 * d_10 == i:
            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):
        d1 = j % 10
        d10 = j // 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == i:
            ans += 1
print(ans)

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

print(t_cnt)

Solution (Python):
a,b = map(int,input().split())
A = list(range(a+1))
count = 0
if b < 10:
  print(0)
else:
  for i in range(2,b+1):
    q = i % 10
    p = i // 10
    if q*p in A and p >= 2 and q >= 2:
      count += 1
  print(count)

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
mod2 = 998244353
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    m,d = LI()
    r = 0
    for i in range(d+1):
        d1 = i//10
        d2 = i%10
        if d1 < 2 or d2 < 2:
            continue
        if m >= d1*d2:
            r += 1

    return r


print(main())

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
        d2 = (d//10) % 10
        if d1 >= 2 and d2 >= 2 and d1*d2 == m:
            count += 1
print(count)

Solution (Python):
M, D = map(int, input().split())
cnt = 0
for month in range(1, M+1):
    for day in range(1, D+1):
        tens = day // 10
        ones = day % 10
        if month == tens * ones and tens >= 2 and ones >= 2:
            cnt += 1

print(cnt)

Solution (Python):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    m, d = list(map(int, readline().split()))
    cnt = 0
    for i in range(1, m + 1):
        for j in range(22, d + 1):
            t = 1
            for v in str(j):
                t *= int(v) if int(v) >= 2 else -1
            if i == t:
                cnt += 1
    print(cnt)


if __name__ == '__main__':
    solve()

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

if d <= 21:
	print(0)
	sys.exit()

cnt = 0
for i in range(1,m+1):
	for j in range(22,d+1):
		d_1 = int(str(j)[1])
		d_10 = int(str(j)[0])

		if d_1 < 2 or d_10 < 2:
			continue

		if d_1 * d_10 == i:
			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(22, d + 1):
        if int(str(j)[0]) > 1 and int(
                str(j)[1]) > 1 and i == int(str(j)[0]) * int(str(j)[1]):
            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):
		d1 = d % 10
		d10 = d // 10
		if d1 >= 2 and d10 >= 2:
			if m == d1 * d10:
				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(10, d+1):
      d1 = j // 10
      d2 = j % 10
      if d1 >= 2 and d2 >= 2 and d1 * d2 == i:
         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(10,d+1):
    if "1" in list(str(j)):
      continue
    j1 = j//10
    j2 = j%10
    if i == j1*j2:
      ans += 1
print(ans)

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

ans = 0

for i in range(2,m+1):
	for j in range(d+1):
		if i==j//10*(j-(j//10)*10) and j>=20 and j-(j//10)*10>=2:
			
			ans = 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):
        d1 = j % 10
        d2 = (j - d1) // 10
        if (d1 > 1) and (d2 > 1):
            if d1 * d2 == 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):
        iti=j%10
        ju=j//10
        if iti>=2 and ju>=2 and i==iti*ju:
            cnt+=1

print(cnt)

Solution (Python):
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    
    return divisors
def examA():
    M, D = LI()
    c = D//10
    ans = 0
    for i in range(2,M+1):
        d = make_divisors(i)

        for j in range(len(d)//2):
            cur0 = d[j*2+1]; cur10 = d[j*2]
            if cur10==1:
                continue
            if cur0<=9:
                if cur10<c:
                    ans +=1

                elif cur10==c and cur0+cur10*10<=D:
                    ans +=1

        for j in range(len(d) // 2):
            cur0 = d[j * 2];cur10 = d[j * 2+1]
            if cur0 == 1:
                continue
            if cur10 <= 9:
                if cur10 < c:
                    ans += 1
                elif cur10 == c and cur0 + cur10 * 10 <= D:
                    ans += 1
        if len(d)%2==1:
            cur0 = d[-1]; cur10 = d[-1]
            if cur10==1:
                continue
            if cur0<=9:
                if cur10<c:
                    ans +=1

                elif cur10==c and cur0+cur10*10<=D:
                    ans +=1

    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,inf
mod = 10**9 + 7
inf = float('inf')

if __name__ == '__main__':
    examA()

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

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

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

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

Solution (Python):

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

for i in range(10,d+1):
    a = i % 10
    b = i // 10
    if a*b <=m and a >= 2 and b >= 2:
        cnt += 1

print(cnt)

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

ans = 0
for m in range(2, M+1):
    for dd in range(11, D + 1):
        d1, d2 = map(int, str(dd))
        ans += d1 > 1 and d2 > 1 and d1 * d2 == m

print(ans)

Solution (Python):
import sys

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

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

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

print(answer)

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 = j % 10
    if d1 <= 1:
      continue
    d2 = int(j / 10)
    if d1 * d2 == i:
      count += 1
      
print(count)

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

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

cnt = 0

for i in range(10,d+1):
    i1 = i%10
    i10 = i//10
    if i1*i10 <= m and i1 >= 2 and i10 >= 2:
        cnt += 1

print(cnt)

Solution (Python):
def mainFunc():
    M, D = list(map(int, input().split(" ")))
    months = []
    for i in range(10, D + 1):
        s = str(i).zfill(2)
        divD = list(map(int, list(s)))
        ml = divD[0] * divD[1]
        if 1 <= ml <= M and divD[0] > 1 and divD[1] > 1:
            months.append(ml)
    
    print(len(months))

mainFunc()

Solution (Python):

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

for i in range(10, d+1):
  i1 = i % 10
  i10 = i // 10

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

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

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

print(ans)

Solution (Python):
n,m=input().split()
if int(m)>=10:
    ans=0
    for i in range(4,int(n)+1):
      for j in range(2,int(m[0])):
        for k in range(2,10):
          if i==j*k:
            ans+=1
    for i in range(4,int(n)+1):
      for j in range(2,int(m[1])+1):
          if i==j*int(m[0]):
            ans+=1
    print(ans)
else:
  print(0)

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

ret = 0
for d1 in range(2, 10) :
    for d10 in range(2, 10) :
        if d10 * 10 + d1 <= D and d10 * d1 <= M :
            ret += 1
print(ret)

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

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

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

print(ans)

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

if day < 22:
  print(0)
else:
  s = 0
  for j in range(month+1):
    for i in range(22,day+1):
      num_1 = i%10
      num_2 = (i-num_1)/10
      if  num_1< 2:
        continue
      elif num_1 * num_2 == j:
        s += 1
  print(s)

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

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

Solution (Python):
import sys


def solve():
    M, D = input().split()
    ans = 0
    
    if int(D) < 22:
        print(0)
        sys.exit()
    
    m, d_1, d_2 = int(M), int(D[0]), int(D[1])

    if int(M) < 4 or d_1 < 2 and d_2 < 2:
        print(0)
        sys.exit()

    for i in range(4, m+1):
        for j in range(2, d_1+1):
            for k in range(2, 10):
                if j == d_1 and k > d_2:
                    break
                if i == j * k:
                    ans += 1
    print(ans)


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

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

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

numOfSekinohi = 0

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

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

print(count)

Solution (Python):

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

ans = 0

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

print(ans)

Solution (Python):
m,d = [i for i in input().split()]
ans = 0
for i in range(1,int(m)+1):
    for j in range(1,int(d)+1):
        if (j//10) < 2 or (j%10) < 2:
            pass
        elif i == ((j//10) * (j%10)):
            ans += 1
        else:
            pass
            
print(ans)

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

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

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

print(ans)

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

Solution (Python):
x=input().split()
count=0
m=int(x[0])
n=list(x[1])
if len(n)==1:
    count=0
else:
    for d in range(2):
        n[d]=int(n[d])
    for i in range(4,m+1):
        for j in range(2,n[0]+1):
                for k in range(2,10):
                    if i==j*k:
                        count+=1
                        if j==n[0] and k>n[1]:
                            count-=1
print(count)

Solution (Python):
M,D = map(int,input().split())
ans = 0
for d in range(22,D+1):
    s = str(d)
    if s[1]<"2":continue
    for m in range(1,M+1):
        if eval(s[0]+"*"+s[1])==m:
            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_s = str(j)
        if len(d_s) == 1 or int(d_s[0]) < 2 or int(d_s[1]) < 2:
            continue
        elif i == int(d_s[0])*int(d_s[1]):
            count += 1
print(count)

Solution (Python):
M,D=map(int,input().split())
ans=0
for i in range(D+1):
  if(i>=10):
    X=i//10
    Y=i%10
    if(X>=2 and Y>=2):
      if(X*Y<=M):
        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(1, D+1):
    d10 = d//10
    d1 = d - (d//10 * 10)
    
    if d10 * d1 == m:
      if d1 >= 2 and d10 >= 2:
        c += 1
        

print(c)

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

count = 0

if M < 4 or D < 22:
  print(0)
else:
  for i in range(4,M+1):
    for j in range(22,D+1):
      d = list(str(j))
      if int(d[0]) < 2 or int(d[1]) < 2:
        continue
      if i == int(d[0])*int(d[1]):
        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(22, D+1):
        s = str(d)
        if int(s[0])<2 or int(s[1])<2: continue
        if int(s[0])*int(s[1])==m:
            ans += 1

print(ans)