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):
def main():
    M, D = map(int, input().split())
    count = 0
    for m in range(1, M+1):
        for d in range(20, D+1):
            s = str(d)
            d1 = s[0]
            d0 = s[1]
            if int(d0) >=2 and int(d1) >=2 and m == int(d1) * int(d0):
                count += 1
    return count

if __name__ == '__main__':

    print(main())

Solution (Python):

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

D1 = D % 10
D10 = D // 10

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

print(ans)

Solution (Python):
A, B = map(int, input().split())

if(B<22):
    print("0")
else:
    answer=0
    for i in range(22,B+1):
        if(i%10 != 1 and i%10 != 0):
            if((i//10) * (i%10) <= A):
                answer+=1
    print(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):
        d10,d1=[int(c) for c in str(d).zfill(2)]
        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(1,m+1):
    for j in range(1,d+1):
        d10=int(("0"+str(j))[-2])
        d1=int(("0"+str(j))[-1])
        if d1>=2 and d10>=2 and d1*d10==i:
            cnt+=1
print(cnt)

Solution (Python):
mm, dd = map(int, input().split())

count = 0
for d in range(1, dd + 1):
    d1 = d % 10
    d10 = d // 10
    m = d1 * d10
    if d1 >1 and d10 > 1 and m <= mm:
        count += 1
print(count)

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

ans = 0
for month 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 == month:
            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%100)//10
        if d1*d10==m and d1>1 and d10>1:
            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(22,d+1):
        d1=j%10
        d10=j//10
        if d1>1:
            if d1*d10==i:
                ans+=1
print(ans)

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

if D<=21:
  print(0)
else:
  for i in range(1,M+1):
    for j in range(22,D+1):
      d01 = j//10
      d10 = j%10
      if d01>=2 and d10>=2 and i==d01*d10:
        a+=1
  print(a)

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

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

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

Solution (Python):
import sys

stdin = sys.stdin

sn = lambda : stdin.readline().rstrip()
an = lambda : map(int, stdin.readline().split())
ni = lambda : int(sn())
def main():
  m, d = an()

  cnt = 0
  for mm in range(1, m+1):
    for i in range(10, d+1):
      d1, d2 = str(i)
      d1 = int(d1)
      d2 = int(d2)
      if d1 >= 2 and d2 >= 2 and d1 * d2 == mm:
        cnt += 1
  print(cnt)

main()

Solution (Python):

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

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

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

print(count)

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

count = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        if len(str(d)) == 1:
            continue
        d10, d1 = map(int, list(str(d)))
        if d10 >= 2 and d1 >= 2 and d1 * d10 == m:
            count += 1
print(count)

Solution (Python):
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)

from math import factorial
import heapq, bisect
import math
import itertools


def main():
    month, day = map(int, input().split())

    ans = 0
    for i in range(1, month + 1):
        for j in range(1, day + 1):
            aaa = j % 10
            bbb = j % 100
            if bbb < 10:
                continue
            bbb = str(bbb)[0]
            bbb = int(bbb)
            if aaa < 2 or bbb < 2:
                continue

            if aaa * bbb == i:
                ans += 1

    print(ans)






if __name__ == '__main__':
    main()

Solution (Python):



import sys
import math
import bisect
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

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

ans = 0

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

print(ans)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
M,D = map(int,input().split(' '))

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
m,d=map(int,input().split())
ans=0
for i in range(m):
    for j in range(d):
        done=(j+1)%10
        dtwo=(j+1)//10
        if done>=2 and dtwo>=2 and done*dtwo==(i+1):
            ans+=1
print(ans)

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
from itertools import permutations,groupby
import sys
import bisect
import string
alp=string.ascii_lowercase
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
mo=10**9+7



M,D=MI()

ans=0


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

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


s = 0
for i in range(1, M+1):
    for j in range(22, D+1):
        if int(str(j)[0]) < 2 or int(str(j)[1]) < 2:
            continue
        d10 = str(j)[0]
        d1 = str(j)[1]
        if int(d10) * int(d1) == i:
            s += 1
print(s)

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

def is_mday(m,d1,d10):
    if d1 >= 2 and d10 >= 2 and m == d1 * d10:
        return True
    else:
        return False

ans = 0
for m0 in range(1,m+1):
    for d0 in range(1,d+1):
        d1 = d0 % 10
        d10 = d0 // 10
        if is_mday(m0,d1,d10):
            ans += 1

print(ans)

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

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

Solution (Python):
M, D = list(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
    m = d1 * d10
    if d1 >= 2 and d10 >= 2 and i == m:
      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):
        d10=j//10
        d1=j%10
        if d10>1 and d1>1:
            if i==d1*d10:
                ans+=1
                
print(ans)

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

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
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 [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  m,d=LI()
  ans=0

  for i in range(1,m+1):
    for j in range(10,d+1):
      j=str(j)
      d1=int(j[1])
      d10=int(j[0])

      if d1<2:
        continue
      if d10<2:
        continue

      if d1*d10==i:
        
        ans+=1
  return ans


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

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

print(ans)

Solution (Python):
M, D = map(int, input().split())
total = 0
for d in range(1, D + 1):
    for m in range(1, M + 1):
        if d >= 20:
            d1 = d // 10
        else:
            break
        if d % 10 < 2:
            break
        else:
            d2 = d % 10
        if d1 * d2 == m:
            total += 1
print(total)

Solution (Python):
a,b=map(int,input().split())
c=0
for i in range(1,a+1):
    for j in range(2,b//10+1):
        if i%j==0:
            if 2<=i//j<10:
                if int(str(j)+str(i//j))<=b:
                    c+=1
print(c)

Solution (Python):
import sys
sys.setrecursionlimit(100000000)


def solve():
  m,d = (int(i) for i in input().split())
  ans = 0
  for m in range(1,m+1):
    for d in range(2,d+1):
      d1 = d%10
      d10 = d//10
      if d1 >= 2 and d10 >= 2:
       if d1*d10 == m:
        ans += 1
      
  
  print(ans)

solve()

Solution (Python):
def seki(D):
  d10 = D//10
  d1 = D%10
  if d1>1 and d10>1:
    return(d1*d10)
  else:
    return 0

M,D = map(int,input().split())
ans = 0
for i in range(1,D+1):
  if 1<=seki(i)<=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(1, d+1):
        if j//10 >= 2 and j%10 >= 2 and (j//10) * (j%10) == i:
            cnt += 1
print(cnt)

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

Solution (Python):
M,D = [int(s) for s in input().split()]
ls=[[a,b] for a in range(2,10) for b in range(2,10)]
count=0
for x in ls:
  if(x[0]*10+x[1]<=D and x[0]*x[1]<=M):
    count+=1
print(count)

Solution (Python):

a, b = map(int, input().split())
ans = 0
for i in range(1, a+1):
    for j in range(1, b+1):
        j1 = j // 10
        j2 = j % 10

        if(j1 * j2 == i and j1 >= 2 and j2 >= 2):
            ans += 1
print(ans)

Solution (Python):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

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

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

count = 0
for month in range(1, M + 1):
    for day in range(1, D + 1):
        if day < 10:
            continue
        day_str = str(day)
        d10 = int(day_str[0])
        d1 = day % 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == month:
            count += 1
print(count)

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

count = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d10, d1 = divmod(d, 10)
        if d1 >= 2 and d10 >= 2 and d1*d10 == 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(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())
ans=0
for m in range(1,M+1):
    for d in range(1,D+1):
        
        s=str(d)
        if len(s)==1:
            s="0"+s
        d1,d10=int(str(s)[0]),int(str(s)[1])
        if m==d1*d10 and d1>=2 and d10>=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 d < 10 :
            continue
        d1 = int(str(d)[0])
        d10 = int(str(d)[1])

        if d1 <= 1 or d10 <= 1 :
            continue
        
        if d1 * d10 == m :
            ans += 1
print(ans)

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

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

print(ret)

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

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

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

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

print(ans)

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

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

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

count=0
for i in range(M):
    for j in range(D):
        d_10=(j+1)//10
        d_1=(j+1)%10
        dd=d_1*d_10
        if dd==i+1 and d_1>=2 and d_10>=2 :
            count+=1
print(count)

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
        d10 = j // 10
        if d1 >= 2 and d10 >= 2 and d1*d10 == i:
            cnt += 1
print(str(cnt))

Solution (Python):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]





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

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

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


def read_int_n():
    return list(map(int, input().split()))


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(M, D):
    ans = 0

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


def main():
    M, D = read_int_n()
    print(slv(M, D))


if __name__ == '__main__':
    main()

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

res = 0

for m in range(1, M + 1):
    for d in range(1, D+1):
        d1 = d % 10
        d2 = d // 10

        if d1 == 1 or d2 == 1:
            continue

        if d1 * d2 == m:
            res += 1

print(res)

Solution (Python):
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    M, D = MAP()
    count = 0
    for mm in range(1, M+1):
        for dd in range(1, D+1):
            d1 = dd % 10
            d10 = dd // 10
            if d1 > 1 and d10 > 1:
                if d1 * d10 == mm:
                    count += 1
    print(count)

if __name__ == '__main__':
    main()

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

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

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

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

print(count)

Solution (Python):
month, day = map(int, input().split())
ans = 0
for m in range(1, month + 1):
    for d in range(1, day + 1):
        if 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 m in range(1, M + 1):
    for d in range(1, D + 1):
        if len(str(d)) == 1:
            continue
        d10, d1 = int(str(d)[0]), int(str(d)[1])
        if (d10 == 1) or (d1 == 1):
            continue
        if d10 * d1 == m:
            ans += 1

print(ans)

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

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

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

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

answer = 0
for d in range(10,D+1):
    a,b = divmod(d,10)
    if a >= 2 and b >= 2 and 1<=a*b<=M:
        answer += 1

print(answer)

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

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

res = 0
for month 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 == month:
            res += 1

print(int(res))

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

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

print(ans)

Solution (Python):
M,D=map(int,input().split())
r=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:
            r+=1
print(r)

Solution (Python):
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*d10==i and d1>=2 and d10>=2:
            
            count+=1
print(count)

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

Solution (Python):
m,d = (int(num) for num in 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 i == d1*d2 and d1 >= 2 and d2 >= 2:
            ans += 1
print(ans)

Solution (Python):
M,D=map(int,input().split())
a=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:
            a+=1
print(a)

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 = list(map(int,input().split()))


count=0
for i in range(1,M+1):
        for j in range(1,D+1):
                if j>=20:
                        if j%10>=2:
                                if (j%10)*(j//10)==i:
                                        count+=1

print(count)

Solution (Python):



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


m,d = [int(i) for i in readline().split()]


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

print(ans)

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

Solution (Python):

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

def check(m,d):
    d1 = d%10
    d2 = d//10
    return d1>=2 and d2>=2 and d1*d2==m

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

print(res)

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

        if (j%10)>=2 and (j//10)>=2 and (j%10)*(j//10)==i:

            ANS+=1

print(ANS)

Solution (Python):


import sys

class ATakahashiCalendar:
    def solve(self):
        m, d = [int(_) for _ in input().split()]
        ans = 0
        for mi in range(1, m + 1):
            for di in range(1, d + 1):
                d1, d2 = di % 10, (di // 10) % 10
                if d1 >= 2 and d2 >= 2 and d1 * d2 == mi:
                    ans += 1

        print(ans)

solver = ATakahashiCalendar()
input = sys.stdin.readline

solver.solve()

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):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

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


def ok(m, d):
    return len(str(d)) == 2 and int(str(d)[0]) >= 2 and int(str(d)[1]) >= 2 and int(str(d)[0]) * int(str(d)[1]) == m


ans = 0
for m in range(1, M + 1):
    for d in range(1, D + 1):
        ans += ok(m, d)
print(ans)

Solution (Python):
M, D = map(int, input().split())
r = 0
for d1 in range(2, 10):
  for d2 in range(2, 10):
    if d1*10+d2 <= D and d1*d2 <= M:
      r += 1
print(r)

Solution (Python):
import sys
import heapq
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7

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

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

    print(ans)


sol()

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

Solution (Python):

from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

M,D = inpl()

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

Solution (Python):
import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline

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

ans = 0
for i in range(1, M + 1):
    for j in range(10, D + 1):
        a, b = map(int, list(str(j)))
        if a >= 2 and b >= 2:
            if a * b == i:
                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 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:
      if (j%10)*(j//10)==i:
        ans+=1
print(ans)

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