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

def check(month,day):
	day_str = str(day)
	if len(day_str) < 2:
		return 0
	else:
		day1 = int(day_str[1])
		day10 = int(day_str[0])
		if day1 >= 2 and day10 >= 2 and month == day1 * day10:
			return 1
		else:
			return 0

cnt = 0
for i in range(1,m+1):
	for j in range(1,d+1):
		cnt += check(i,j)

print(cnt)

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

Solution (Python):


a = []
a = input().split()

M = int(a[0])
D = int(a[1])

count = 0

for i in range(M) :
	f = 22
	for j in range(D - 21) :
		if (f // 10)*(f % 10) == i + 1 :
			count = count + 1
			if (f // 10) == 1 or (f % 10) ==1 :
				count = count - 1
		f = f + 1





print(count)

Solution (Python):


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


cnt = 0
for i in range(M+1):
    for j in range(D+1):
        m = i
        d_10 = j//10
        d_1 = j - d_10 * 10
        if d_10 > 1 and d_1 > 1 and m == d_10 * d_1:
            cnt += 1
print(cnt)

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

Solution (Python):
import sys 
m,d = map(int,input().split())
if m<=3:
  print(0)
  sys.exit()
cnt = 0
def make_d(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i and n//i != n:
        divisors.append(n//i)

  divisors.sort()
  return divisors
  
for i in range(4,m+1):
  l = make_d(i)
  l.pop(0)
  n = len(l)
  if not l:
    pass

  elif n%2 == 0:
    for x in range(n//2):
      if int(str(l[x])+str(l[-x-1])) <= d:
        cnt += 1

      if int(str(l[-x-1])+str(l[x])) <= d:
        cnt += 1  

  else:
    for x in range(n//2):
      if int(str(l[x])+str(l[-x-1])) <= d:
        cnt += 1

      if int(str(l[-x-1])+str(l[x])) <= d:
        cnt += 1
        
    if int(str(l[n//2])+str(l[n//2])) <= d:
      cnt += 1  
print(cnt)

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

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

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

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

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

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

count = 0

for i in range(22, D+1):
  first_1 = i % 10
  second_1 = i // 10
  if first_1 < 2:
    continue
  if first_1 * second_1 <= M:
    count += 1
print(count)

Solution (Python):
from sys import stdin
import numpy as np
from operator import itemgetter

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

D10=D//10
D1=D%10

ans=0
for i in range(2,D10):
    for j in range(2,10):
        if i*j<=M:
            ans+=1
i=D10
if i < 2:
    print(0)
else:
    for j in range(2,D1):
        if i*j<=M:
            ans+=1

    j=D1
    if j>1:
        if i*j<=M:
            ans+=1
    print(ans)

Solution (Python):
M,D = map(int,input().split())
ans = 0
s = []
for i in range(4,M+1):
    for j in range(22,D+1):
         k = str(j)
         if  int(k[0])*int(k[1]) == i:
             ans += 1
             s.append(i)
             s.append(j)
ans_2 = ans
for i in range(len(s)//2):
    if s[i*2-1]%10 == 1 or s[1*2-1]//10 == 1:
        ans_2 -= 1
print(ans_2)

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

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

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

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

            if d1 >= 2 and d2 >= 2 and m == d1 * d2:
                ans += 1
                
    print(ans)

if __name__ == '__main__':
    p_a()

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

print(ans)

Solution (Python):
M, D = (int(x) for x in input().split())
ans = 0

M_list = list(range(1,M+1))
D_list = list(range(1,D+1))

for i in M_list:
    for j in D_list:
        if j // 10 >= 2:
            if j % 10 >= 2:
                if i == (j // 10) * (j % 10):
                    ans += 1
                    
print(ans)

Solution (Python):
import math


if __name__ == "__main__":
    M, D = map(int, input().split())

    count = 0
    
    for m in range(M):
        for i in range(D):
            d = str(i+1).zfill(2)
            x = int(d[0])
            y = int(d[1])

            if x * y == m+1:
                if x >= 2 and y >= 2:
                    count += 1
    print(count)

Solution (Python):
divisors = [[] for i in range(101)]

for i in range(4, 101):
	for j in range(2, 10):
		if i % j == 0 and (i//j)//10 == 0 and i//j >= 2:
			divisors[i].append([j, i//j])

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

count = 0
for i in range(4, M+1):
	for divisor in divisors[i]:
		if divisor[0]*10 + divisor[1] <= D:
			count += 1

print(count)

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

count = 0
for i in range(1,d+1):
    i1 = i % 10
    i2 = i // 10
    if i1 >= 2 and i2 >= 2 and i1 * i2 <= m and i1 * i2 >= 1:
        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(22, d+1):
    d10, d1 = j // 10,j % 10
    if d10 >= 2 and d1 >= 2:
      if i == d10*d1:
        cnt+=1
print(cnt)

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

Solution (Python):

"""
Created on Sat Aug 24 21:04:16 2019

@author: Toroi0610
"""

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)

    divisors.sort()
    return divisors

M, D = map(int, input().split())
day = [str(d) for d in range(1, D+1)]
cnt = 0
for m in range(1, M+1):
    s = make_divisors(m)
    length = len(s)
    if length == 2:
        continue
    if length%2 == 0:
        for l, r in zip(s[:int(length/2)], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    cnt += 1
                if str(r)+str(l) in day:
                    cnt += 1
    else:
        for l, r in zip(s[:int(length/2)+1], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    cnt += 1
                if l != r:
                    if str(r)+str(l) in day:
                        cnt += 1
print(cnt)

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

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

Solution (Python):
A = list(map(int, input().split()))
 
M = A[0]
D = A[1]
count = 0
 
for i in range(4,M+1):
  for j in range(22,D+1):
    day = list(str(j))
    m10 = int(day[0])
    m1 = int(day[1])
    if m10 < 2:
      continue
    elif m1 < 2:
      continue
    
    if i == m10 * m1:
      count+=1
    
  
 
print(count)

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

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

Solution (Python):
m,d=map(int,input().split())
if d<22:
  print(0)
else:
  t=d//10
  o=d-(t*10)
  i=2
  ans=0
  k=2
  while i<t and i*2<=m:
    j=2
    while j*i<=m and j < 10:
      ans+=1
      j+=1
    i+=1
  while t*k<=m and k<=o:
    ans+=1
    k+=1
  print(ans)

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

ans = 0

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

print(ans)

Solution (Python):
k = 0
m,d  = (int(i) for i in input().split()) 
listm = range(1,m + 1)
listd = range(1,d + 1)
for a in listm:
 for b in listd:
  if len(str(b)) >= 2:
   if int(str(b)[0]) >= 2:
    if int(str(b)[1]) >= 2:
       
       if a == int(str(b)[0]) * int(str(b)[1]):
         
         k = k + 1
print(k)

Solution (Python):
data = input().split(" ")

M = int(data[0])
D = int(data[1])



count = 0


for i in range(M):
    i += 1
    
    for j in range(D):
        j += 1
        
        if j >= 10:
            d_1 = int(str(j)[:1])
            d_10 = int(str(j)[1:])
            if d_1 >= 2 and d_10 >= 2:
                if d_1 * d_10 == i:
                    count += 1
print(count)

Solution (Python):



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

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

print(c)

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

count = 0

for day in range (2,d+1):
    for month in range(2,m+1):
        d_1 = day%10
        d_10 = day//10
        if ((d_1 * d_10) == month) and (d_1 >= 2) and(d_10 >= 2):
            count += 1

print(count)

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

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

Solution (Python):

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


count = 0
m_list = []

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

    if d10 < 2:
        continue
    if d1 == 1:
        continue

    if d10 * d1 in range(1, M + 1):
        count += 1
print(count)

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

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

Solution (Python):
m,d=map(int,input().split())
if d<22:
  print(0)
else:
  ans=0
  for M in range(m+1)[1:]:
    for D in range(d+1)[22:]:
      q=D%10
      r=(D-q)//10
      if r>=2 and q>=2 and M==q*r:
        ans += 1
  print(ans)

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

seki = 0
for a in range(1, m + 1):
    for b in range(1, d + 1):
        if b < 10:
            continue
        c = list(map(int, list(str(b))))
        if c[0] >= 2 and c[1] >= 2 and c[0] * c[1] == a:
            seki += 1

print(seki)

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

for month in range(4, M+1):
    if len(str(D)) == 2:
        for day in range(22,D+1):
            if int(str(day)[0]) >= 2 and int(str(day)[1]) >= 2:
                if int(str(day)[0]) * int(str(day)[1]) == month:
                    count += 1

print(count)

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

cnt = 0

if m <= 3 or d <= 21:
	print(0)
else:
	for i in range(22,d+1):
			d10 = int(i/10)
			d1 = int(i%10)
			
			
			if d1 >= 2 and d10 >= 2 and d1*d10  <= m:
				cnt += 1

	print(cnt)

Solution (Python):
def main () :

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

    if (D <= 10) :
        print("0")
        return
    
    count = 0
    for m in range(1,M+1) :
        for d in range(11, D+1) :
            str_d = str(d)
            d1 = int(str_d[0])
            d10 = int(str_d[1])

            if (d1 < 2 or d10 < 2) :
                continue

            if (m == d1 * d10) :
                count += 1
    
    print(count)






main()

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

M = int(i[0])
D = i[1]
a = [[j,k] for k in range(20,int(D)+1) for j in range(M+1)\
     if j == int(str(k)[0])*int(str(k)[1]) and int(str(k)[0]) >= 2 and int(str(k)[1]) >= 2]

print(len(a))

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

 
count = 0
for ii in range(1,M+1):
    
    for i in range (22, D + 1):
        
        d1 = i % 10
        d2 = i // 10
        
        if d1 < 2 or d2 < 2:
            continue
        
        if ii == d1 * d2:
            count = count + 1
        
        
 
print(count)

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

Solution (Python):
def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True





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

counter = 0





if D >= 22:
	for i in range(M):
		if not is_prime(i+1):
			for j in range(22,D+1):
			
				j_0 = j%10
				j_1 = j//10

				if i+1 == j_0*j_1 and j_0 >= 2:
					counter += 1

print(counter)

Solution (Python):
m,d=[int(i) for i in input().split()]
k=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:
      k+=1
print(k)

Solution (Python):

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

ans = 0

for m in range(M):

    m += 1

    for d in range(D):

        d += 1

        if d < 100 and d >= 10:

            d10 = d // 10
            d1  = d % 10

            if d10 >= 2 and d1 >= 2 and d10 * d1 == m:

                ans += 1

print (ans)

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

for i in range(1, H[0]+1):
    for k in range(1, H[1]+1):
        if k > 9:
            p = str(k)
            if int(p[-1]) >= 2 and int(p[-2]) >= 2 and int(p[-1]) * int(p[-2]) == i:
                count += 1

print(count)

Solution (Python):


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

for cm in range(1, m+1):
    for cd in range(21, d + 1):
        if (cd // 10) * (cd % 10) == cm and cd % 10 > 1:
            count += 1

print(count)

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

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

Solution (Python):
M,D=map(int,input().split())
count=0
for m in range(M):
    month=m+1
    for d in range(D):
        day=d+1
        if day//10>0:
            a,b=map(int,list(str(day)))
            if month==a*b and a>1 and b>1:
                count+=1
print(count)

Solution (Python):

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

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

count = 0

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

print(count)

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

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

count=0

for i in range(1,M+1):
    for j in range(22,D+1):
        if (j%10)==1:
            pass
        elif i==((j-j%10)/10*(j%10)):
            count+=1
          
print(count)

Solution (Python):
m, d = map(int, raw_input().split())
c = 0
for d1 in range(2, 10):
    for d10 in range(2, d/10+1):
        if d1+10*d10 <= d and d1*d10 <= m:
            
            
            c +=1
print(c)

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

Solution (Python):


import sys

def main() -> int:
    [m, d] = [int(x) for x in sys.stdin.read().split(' ')]
    
    ms = [mul(x) for x in range(1, d + 1)]
    months = set(range(1, m + 1))
    ans = len([x for x in ms if x in months])
    print(ans)
    return 0

def mul(x):
    a = int(x // 10)
    b = int(x % 10)
    if a < 2 or b < 2: return 0
    return a * b


if __name__ == "__main__":
    exit(main())

Solution (Python):
a,b = [int(s) for s in input().split()]
count = 0
for j in range(a):
  j += 1
  for i in range(b):
    i += 1
    if i <= 20:
      pass
    else:
      p = i % 10
      q = int((i - p)/10)
      if j == p * q and p != 1:
        count += 1
print(count)

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


def is_prime(n):
    a = []
    for i in range(2, n+1):
        for k in range(2, int(math.sqrt(i)) + 1):
            if i % k == 0:
                a.append(i)
                break

    return a

lis = is_prime(M)
b = 0

if D <22:
    print(0)
else:
    for m in lis:
        for i in range(22, D+1):
            b1 = i%10
            b10 = i//10
            if b1 != 1 and b10 != 1 and b1 * b10 == m:
                b +=1
    print(b)

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

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

print(cnt)

Solution (Python):
m, d = map(int, input().split())
if d<22 or m<4 : print(0)
else:
    res = 0
    for i in range(22,d+1):
        i1, i10 = i%10, i//10
        if i1 < 2 or i10 < 2: continue
        elif m >= i1 * i10: res += 1
    print(res)

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

c=0
if d<22:
    print(0)
else:
    for j in range(m):
        for i in range(d-21):
            d1,d10=int(str(i+22)[1]),int(str(i+22)[0])
            
            
            if d1>1 and d10>1 and d1*d10==j+1:
                c+=1
                
    print(c)

Solution (Python):
M,D = map(int,input().split())
count=0
for d in range(20,D+1):
    if d%10 ==0 or d%10 == 1:
        continue
    elif (d//10)*(d%10) <= M:
        count+=1
print(count)

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

Solution (Python):
import sys
M, d = input().split()
if int(d)>=10:
  d10 = int(d[0])
  d1 = int(d[1])
else:
  print(0)
  sys.exit()
M = int(M)
ans = 0
for j in range(2,d10+1):
  for i in range(2,10):
    if 10*j+i>d10*10+d1:
      print(ans)
      sys.exit()
    if M >=j*i:
      ans+=1
print(ans)

Solution (Python):
s = list(map(int, input().split())) 
result = []
month = s[0]

m = list(range(4,month + 1))

day= s[1]
count = 0

for i in range(2,day + 1):
    d1 = i % 10
    d2 = i//10
    if (d1 >= 2) and (d2 >=2):
        if d1 * d2 in m:
            count +=1
print(count)

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

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

count = 0

for month in range(1,m+1):
    for day in range(1,d+1):
        d_1  = day%10
        d_10 = day//10
        if (d_1>=2 and d_10>=2):
            if d_1 * d_10 == month:
                count = count + 1
        else:
            pass
        
print(count)

Solution (Python):
dg = input().split()
m = int(dg[0])
d = int(dg[1])
count = 0
for i in range(m + 1):
    if i !=0:
        for e in range(d + 1):
            if(len(str(e)) >= 2):
                ee = str(e)
                d1 = int(ee[0])
                d2 = int(ee[1])
                
                if d1*d2 == i and d1 >=2 and d2>=2:
                    count = count +1

                    
                    
print(count)

Solution (Python):
M,D=map(int,input().split())
counter=0
for i in range(1,M+1):
    for j in range(1,D+1):

        if j<10:
            continue
        else:
            k=str(j)
            if int(k[0])>=2 and int(k[1])>=2:
                if int(k[0])*int(k[1])==i:

                    counter+=1
print(counter)

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(22, d+1):
		j1 = j%10
		j2 = int(j/10)
		if j1 >= 2 and j1 * j2 == i:
			ans += 1

print(ans)

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

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

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

print(ans)

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

counter=0

m=1
while m<=M:
  d=22
  while d<=D:
    d1=d%10
    d10=d//10
    if d1>1 and d10>1 and d1*d10==m:
      counter+=1
    
    d+=1
  
  m+=1
  
print(counter)

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

if int(d) < 22 or int(m) < 4:
    print(ans)
    exit()

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

print(ans)

Solution (Python):
a = [int(i) for i in input().split(" ")]
num = 0
for m in range(1, a[0]+1):
    for d in range(10, a[1]+1):
        d_1 = list(str(d))
        if int(d_1[0]) >= 2 and int(d_1[1]) >= 2 and int(d_1[0])*int(d_1[1]) == m:
            num += 1
print(num)

Solution (Python):

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

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

print(ans_count)

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

Solution (Python):
l = input().split()
m = int(l[0])
d = str(l[1])
cnt = 0 
for i in range(1, m+1):
  for j in range(22, int(d)+1):
    j = str(j)
    d10 = int(j[0])
    d1 = int(j[1])
    if i == d10 * d1 and d10 >= 2 and d1 >= 2:
      cnt += 1

print(cnt)

Solution (Python):
from sys import stdin

m,d = map(int,stdin.readline().rstrip().split())
day = 0
for s in range(1,m+1):
    for i in range(1,d+1):
        if i > 9:
            k = str(i)
            ten = int(k[0])
            one = int(k[1])
            if ten>1 and one>1:
                if ten*one == s:
                    day += 1
print(day)

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

cnt = 0

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

print(cnt)

Solution (Python):
M,D=(int(x) for x in input().split())
count=0
for d in range(1,D+1):
  for m in range(1,M+1):
    if (d%10)>=2 and int(d//10)>=2:
    	if m==(d%10)*int(d//10):
      		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(22, D+1):
        listD = [int(c) for c in str(j)]
        if listD[0] * listD[1] == i and listD[1] >= 2:
            cnt += 1

print(cnt)

Solution (Python):
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

m, d = na()
if d < 22:
    print(0)
else:
    d10max = int(str(d)[0])
    d1max = int(str(d)[1])
    c = 0
    for d10 in range(2, d10max):
        for i in range(2, 10):
            if d10 * i <= m:
                c += 1

    for i in range(2, d1max+ 1):
        if d10max * i <= m:
            c += 1
    print(c)

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

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

    if d1 >= 2 and d2 >= 2 and d1 * d2 <= M:
        count += 1
print(count)

Solution (Python):
MD = [int(i) for i in input().split()]

c = 0
for m in range(1, MD[0] + 1):
    for d in range(1, MD[1] + 1):
        
        d1  = d % 10
        d10 = (d - d1) /10
        if d1 < 2 or d10 <2:
            continue

        if m == d1 * d10:
            
            c+=1

print(c  )

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

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

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

if M < 4:
    print('0')
else:
    for i in range(4, M+1):
        for j in range(22, D+1):
            j = str(j)
            jli = list(j)
            if jli[1] == '0' or jli[1] == '1':
                pass
            else:
                if int(jli[0])*int(jli[1]) == i:
                    
                    cnt += 1

    print(cnt)

Solution (Python):
m,d=map(int,input().split())
c=0
for i in range(3,m):
  for j in range(19,d):
    if 2<=int(str(j+1)[-1]):
      if int(str(j+1)[0])*int(str(j+1)[1])==i+1:
        c+=1
print(c)

Solution (Python):
import sys
inputs = sys.stdin.readlines()

M, D = map(int, inputs[0].split())

good_dates = []
for date in range(D):
    d10 = (date+1) // 10
    d1 = (date+1) % 10
    if d1 >= 2 and d10 >= 2:
        if d1*d10 <= M:
            good_dates.append((d1*d10, date))
print(len(good_dates))

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

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

print(ct)

Solution (Python):

import numpy as np

m, d = map(int, input().split())
day = [i for i in range(22, d+1)]

res_mult = []
for d in day:
    d10 = int(list(str(d))[0])
    d1 = int(list(str(d))[1])
    if d1 < 2:

        continue
    else:
        res_mult.append(d10*d1)


res_mult = np.array(res_mult)


print(np.sum(res_mult <= m))

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

count = 0
for m in range(4,M+1):
    day = list(range(22,D+1))
    for d in day:
        D1,D10 =map(int,list(str(d)))
        if D1<=1 or D10 <=1:
            continue
        
        if m==D1*D10:
            count+=1

print(count)

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

Solution (Python):
m, d = map(int, input().split())
count = 0
for i_m in range(m + 1):
    for j_d in range(d + 1):
        d_01 = j_d % 10
        d_10 = j_d // 10
        if d_01 < 2 or d_10 < 2:
            continue
        if i_m == d_01 * d_10:
            count += 1
print(count)

Solution (Python):
M, D = [int(x) for x in input().split()]
dates = list(range(22,D+1))
c = 0
 
for i in range(len(dates)):
  d1 = int(str(dates[i])[-1])
  d2 = int(str(dates[i])[-2])
  if d1*d2 <= M and d1 > 1 and d2 > 1:
    
    c += 1
print(c)

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

Solution (Python):
m, d = map(int, input().split())
c = 0
for i in range(m):
    for j in range(max(0, d - 9)):
        dl = list(map(int, list(str(j + 10))))
        if dl[0] >= 2 and dl[1] >= 2 and dl[0] * dl[1] == i + 1:
            c += 1
print(c)

Solution (Python):
M,D = map(int,input().split())
count = 0
if D < 22:
  print(count)
  exit()

for i in range(1,M+1):
  for j in range(22,D+1):
    if i == (j//10) * (j%10):
      if j%10 <= 1:
        continue
      else:
        count += 1
print(count)

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

ans=0
for j in range(1,m+1):
  for i in range(11,d+1):
    l=[int(a) for a in str(i)]
    if 1 not in l:
      x=l[0]*l[1]
      if j==x:
        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):
        d10 = int(str(d)[1])
        d1 = int(str(d)[0])
        if m == d10 * d1 and d10>=2 and d1 >= 2:
            ans += 1

print(ans)