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):
s = input().split()
m,d=int(s[0]),int(s[1])
n = 0
for i in range(d):
    w = str(i+1)
    if len(w)==2 and int(w[1])>1 and int(w[0])>1:
        p = 1
        for j in w:
            p*=int(j)
        if p<=m and p!= 0:
            n+=1
print(n)

Solution (Python):
import sys

input = sys.stdin.readline

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

count = 0

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

print(count)

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

Solution (Python):
m, d = (int(i) for i in input().split())
count = 0
for month in range(2, m+1):
    for day in range(2, 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 += 1
print(count)

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

ans = 0
for m in range(1, M + 1):
    for d in range(22, D + 1):
        d10, d1 = [int(_) for _ in str(d)]
        if d1 < 2: continue

        ans += int(d1 * d10 == m)
print(ans)

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

print(ans)

Solution (Python):
import sys


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

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

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

print(ans)

Solution (Python):
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True 
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque
from collections import Counter
import itertools

INF = 10 ** 10

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

cnt = 0

for i in range(1, M+1):
    for j in range(1, D+1):
        if j < 10:
            continue

        s = str(j)
        d10 = int(s[0])
        d1 = int(s[1])

        if d10 >= 2 and d1 >= 2:
            if i == (d10*d1):
                cnt+= 1

print(cnt)

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

            c+=1
print(c)

Solution (Python):



l=input()
M,D=l.split(" ")
M=int(M)
D=int(D)


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

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 > 1 < d // 10 and (d // 10) * (d % 10) == m:
            cnt += 1

print(cnt)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    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 min(d1, d10) < 2:
                continue
            if d1 * d10 == m:
                cnt += 1

    return cnt


if __name__ == '__main__':
    print(main())

Solution (Python):
M, D = map(int,input().split())
ans = 0
if D < 10:
    print(0)
    exit()
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:
            if d10 >= 2:
                if d1 * d10 == i:
                    ans += 1
print(ans)

Solution (Python):
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
import math
import queue

Mod = 1000000007




def main(): 
    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:
                continue
            else:
                p = [k for k in str(j)]
                if int(p[0])<2 or int(p[1])<2:
                    continue
                elif int(p[0])*int(p[1]) == i:
                    ans += 1
    print(ans)
if __name__ == "__main__":
    main() 





def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n < 2 is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))):
        if prime[i] == 1:
            for j in range(2*i,n):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n):
        if prime[i] == 1:
            res.append(i)
    return res

class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py

    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)

Solution (Python):

import sys


def solve(M: int, D: int):
    count = 0
    for m in range(1, M+1):
        for d in range(1, D+1):
            d_1 = d % 10
            d_10 = d // 10
            if d_1 >= 2 and d_10 >= 2 and d_1*d_10 == m:
                count += 1
    print(count)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    M = int(next(tokens))  
    D = int(next(tokens))  
    solve(M, D)

if __name__ == '__main__':
    main()

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

count=0

i=10
while i<D+1:
  if D<10:break
  temp=str(i)
  d1=int(temp[0])
  d2=int(temp[1])
  if d1*d2<=M and d1>1 and d2>1:
    count+=1
    
  
  i=i+1
  
print(count)

Solution (Python):

n,m = map(int, raw_input().split())
ans = 0
for i in xrange(1,n+1):
  for j in xrange(1,m+1):
    ten = j/10
    one = j%10
    if j < 22 or ten < 2 or one < 2:
      continue
    if j/10 * (j%10) == i:
      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(22, d+1):
        a += (j//10*(j%10) == i)&(j%10 > 1)
print(a)

Solution (Python):
N,M = map(int,input().split())
ans = 0
for n in range(1,N + 1):
        for m in range(1,M + 1):
                m = str(m)
                if len(m) == 1:
                        continue
                if int(m[1]) < 2 or int(m[0]) < 2:
                        continue
                if n == int(m[0]) * int(m[1]):
                        ans += 1
print(ans)

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

Solution (Python):

def solve():
    M, D = map(int, input().split())
    res = 0 
    for i in range(1,D+1):
        if (i//10)>=2 and (i%10)>= 2 and 1 <= (i//10)*(i%10) <= M:
            res += 1
    return str(res)

if __name__ == '__main__':
    print(solve())

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

result = 0
if d < 12:
    print(0)
    exit()
for i in range(1, m+1):
    for j in range(12, d+1):
        a1 = j % 10
        ba10 = j // 10
        if a1 >= 2 and ba10 >= 2:
            if i == a1 * ba10:
                result+=1

print(result)

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

c=0

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

print(c)

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

if D <= 21:
    print(0)
else:
    ans = 0
    for i in range(22, D+1):
        a = int(str(i)[0])
        b = int(str(i)[1])
        if a * b <= M and a >= 2 and b >= 2:
            ans += 1
    print(ans)

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

cnt = 0
for month in range(1, m + 1):
    for x in range(20, d+1):
        d10 = x // 10
        d1 = x % 10
        if d10 * d1 == month and d1 != 1:
            cnt += 1
print(cnt)

Solution (Python):
M, D = map(int, input().split())
res = 0
for i in range(1, D + 1):
  for j in range(1, M + 1):
    if i < 10:
      continue
    n = list(str(i))
    if int(n[0]) < 2 or int(n[1]) < 2:
      continue
    if int(n[0]) * int(n[1]) == j:
      res += 1
print(res)

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

        if d1 >= 2 and d1 * d10 == i:
            count += 1

print(count)

Solution (Python):
import sys


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


def main():
    m, d = map(int, input().split())
    ans = 0
    for i in range(1, m+1):
        for k in range(1, d+1):
            if k >= 22 and int(str(k)[1]) >= 2:
                if i == int(str(k)[0])*int(str(k)[1]):
                    ans += 1
                    

    print(ans)


if __name__ == '__main__':
    main()

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

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

Solution (Python):




 
from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul,itemgetter
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)

 
def main():
    ans=0
    a,b=map(int,input().split())
    for j in range(1,a+1):
        for i in range(10,b+1):
            c=str(i)
            if int(c[0])>=2 and int(c[1])>=2:
                if j==int(c[0])*int(c[1]):
                    ans+=1
    print(ans)
if __name__ == '__main__':
    main()

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

c = 0
if d < 20:
	print(0)
	exit()
for i in range(1,m+1,1):
	for k in range(20,d+1,1):
		d1 = k%10
		d2 = k//10
		if d1>=2 and d1*d2 == i:
			c+=1
print(c)

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

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

if D < 10:
    print("0")
    sys.exit()

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

Solution (Python):
from collections import defaultdict, Counter
from heapq import heapify, heappop, heappush
from sys import stdin

def main():
    M, D = map(int, input().split())
    ans = 0
    for m in range(1, M+1):
        for d in range(10, D+1):
            d_1 = d % 10
            d_10 = d // 10
            if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == m:
                ans += 1
    print(ans)

input = lambda: stdin.readline().rstrip()
main()

Solution (Python):
import copy

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
s =0
m,d = ips()
for i in range(1,m+1):
    for k in range(1,d+1):
        if k >= 20 and (k%10) >= 2:
            if (k%10) * (k//10) == i:
                s+=1
print(s)

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

      count+=1
print(count)

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

Solution (Python):

M,D = map(int,input().split())
cnt = 0
for i in range(M+1):
    for j in range(D+1):
        d1 = j-(j//10)*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
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):
m,d=map(int,input().split())


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

print(cnt)

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

Solution (Python):
M, D = (int(i) for i in 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 and m == d1 * d10:
            cnt = cnt + 1
print(cnt)

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

Solution (Python):
from math import sqrt
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):
a, b = (int(_) for _ in input().split())
res = 0
for i in range(4,a+1):
    for ii in range(10,b+1):
        if (ii % 10) >= 2 and (ii //10) >= 2:
            if i == ((ii % 10) * (ii //10)):
                res += 1

print(res)

Solution (Python):
M,D = (int(i) for i in input().split())
ans = 0
for m in range(1,M+1):
    for d in range(1,D+1):
        hoge = [int(s) for s in str(d)]
        if len(hoge) == 1: hoge.insert(0,0)
        do,dt = hoge
        if do >= 2 and dt >= 2 and dt*do == 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 >= 20:
            s = str(j)
            d10 = int(s[0])
            d1 = int(s[1])
            if i == d1*d10 and d1 >= 2:
                cnt += 1
print(cnt)

Solution (Python):


import sys
import math
import collections
import itertools
def input(): return sys.stdin.readline().strip()
def gcd(x, y): return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y): return (x * y) // gcd(x, y)
MOD = 10 **9 + 7



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







ans = 0

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

            if int(dd[0]) * int(dd[1]) == 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):
        d10 = j // 10
        d1 = j % 10

        if d10 < 2 or d1 < 2:
            continue

        cnt += 1 if i == d10 * d1 else 0

print(cnt)

Solution (Python):


import math
import sys
import itertools
import numpy as np


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

print(answer)

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

print(a)

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

m,d = na()

a = 2
ans = 0

for a in range(2,10):
    for i in range(2,10):
        if a*10+i > d:
            continue
        if a*i <= m:
            ans += 1

print(ans)

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

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

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


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

print(ans)

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

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

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

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

    print(cnt)
            


main()

Solution (Python):
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    [m, d] = li()
    seki = 0
    for mi in range(1, m + 1):
        for di in range(1, d + 1):
            d10 = di // 10
            d1 = di % 10
            if mi == d1 * d10 and d1 >= 2 and d10 >= 2:
                seki = seki + 1
                
    print(seki)

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

print(ans)

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

if m<=3:
    print(0)
else:
    ans=0
    for i in range(4, m+1):
        for j in range(2, i):
            if i%j==0:
                if len(str(j))==1 and len(str(i//j))==1 and 10*j+i//j<=d:
                    ans+=1
    print(ans)

Solution (Python):



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

    counter = 0
    for m in range(2, M + 1):
        for dd in range(20, D + 1):
            d1 = dd % 10
            if d1 < 2:
                continue

            d10 = dd // 10
            if d1 * d10 == m:
                counter += 1

    print(counter)


if __name__ == '__main__':
    main()

Solution (Python):
m, d = map(int, input().split())
cnt = 0
for i in range(1, m+1):
    for j in range(10, 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())

cnt = 0
for i in range(1, M+1):
    for j in range(22, D+1):
        d_10 = j // 10
        d_1 = j % 10
        if d_10 < 2 or d_1 < 2:
            continue
        if i == d_10 * d_1:
            cnt += 1
print(cnt)

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

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

                ans += 1
print(ans)

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

count = 0
for m in range(M):
    for d in range(11,D+1):
        if m+1 == (d//10)*(d%10) and d//10>=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(22,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 = [int(x) for x in input().split()]
cnt = 0
for i in range(10, 1+D):
    d1, d10 = [int(s) for s in str(i)]
    if (d1 == 1 or d10 == 1): continue
    cnt += (1 <= d1 * d10 <= M)
print(cnt)

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

for x in range(2, 10):
    for y in range(2, 10):
        if 1 <= x * y <= m and 10 * x + y <= d:
            c += 1

print(c)

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

ans = 0

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

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

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

print(c)

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

ans = 0
for mi in range(1,m+1):
    for di in range(1,d+1):
        if di<10: continue
        di1 = di%10
        di10 = di//10
        if di1 >=2 and di10>=2 and di1*di10==mi:
            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(22,D+1):
        temp=str(j)
        if temp[0] >="2" and temp[1]>="2":
            if int(temp[1]) * int(temp[0])==i:
                count+=1

print(count)

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

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

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

ans =0
for i in range(4,M+1):
    for j in range(22,D+1):
        j_s = str(j)
        if(int(j_s[0])>=2 and int(j_s[1])>=2):

            if((int(j_s[0]) * int(j_s[1])) == 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(1, D+1):
        d1 = d // 10
        d2 = d % 10
        if d1 >= 2 and d2 >= 2 and d1 * d2 == m:
            count += 1
print(count)

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

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

print(cn)

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

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

print(ans)

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

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

Solution (Python):
import math
import sys
import numpy as np
from collections import defaultdict, deque, Counter 
from itertools import accumulate, product, permutations,combinations, combinations_with_replacement
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd

max_value = 1000000000
min_value = -1000000000
sys.setrecursionlimit(max_value)

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

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

print(count)

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

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

Solution (Python):
M,D = map(int,input().split())
if D < 20:
	print(0)
	exit()
m = [0 for i in range(M+1)]

for i in range(22, D+1):
	d10 = i // 10
	d1 = i % 10
	if d10 >= 2 and d1 >= 2 and d1*d10 <= M:
		m[d1*d10] += 1

print(sum(m))

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())
import sys
counter = 0
if D<10:
    print(0)
    sys.exit()
for m in range(1,M+1):
    for d in range(10,D+1):
        d10 = int(str(d)[0])
        d1 = int(str(d)[1])
        if d10>=2 and d1>=2 and d1*d10==m:
            counter += 1

print(counter)

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

Solution (Python):
M,D=map(int, raw_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 sys
def input():
	return sys.stdin.readline().strip()

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

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

print(num)

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

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

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

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

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


print(res)

Solution (Python):
def getlist():
    return list(map(int, input().split()))

M, D = getlist()

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

print(ans)