Problem:
 Score : 200 points    Problem Statement Today is August 24 , one of the five Product Days in a year.  A date m - d ( m is the month, d is the date) is called a Product Day when d is a two-digit number, and all of the following conditions are satisfied (here d_{10} is the tens digit of the day and d_1 is the ones digit of the day):   d_1 \geq 2  d_{10} \geq 2  d_1 \times d_{10} = m   Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of M month from Month 1 to Month M , and each month consists of D days from Day 1 to Day D .  In Takahashi Calendar, how many Product Days does a year have?      Constraints  All values in input are integers.  1 \leq M \leq 100  1 \leq D \leq 99         Input Input is given from Standard Input in the following format:  M  D       Output Print the number of Product Days in a year in Takahashi Calender.        Sample Input 1 15 40      Sample Output 1 10  There are 10 Product Days in a year, as follows ( m - d denotes Month m , Day d ):   4 - 22  6 - 23  6 - 32  8 - 24  9 - 33  10 - 25  12 - 26  12 - 34  14 - 27  15 - 35        Sample Input 2 12 31      Sample Output 2 5       Sample Input 3 1 1      Sample Output 3 0

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

Solution (Python):
def main(sample_file = ''):

    """ convenient functions
    
    
    
    
    
    """

    """convenient decorator
    
    
        
        
        
        
        
        
        
        
        
        
    """
    
    
    import sys
    sys.setrecursionlimit(10**7)
    from itertools import accumulate, combinations, permutations, product 
    
    from math import factorial, ceil, floor, sqrt
    def factorize(n):
        """return the factors of the Arg and count of each factor
        
        Args:
            n (long): number to be resolved into factors
        
        Returns:
            list of tuples: factorize(220) returns [(2, 2), (5, 1), (11, 1)]
        """
        fct = []  
        b, e = 2, 0  
        while b * b <= n:
            while n % b == 0:
                n = n // b
                e = e + 1
            if e > 0:
                fct.append((b, e))
            b, e = b + 1, 0
        if n > 1:
            fct.append((n, 1))
        return fct
    def combinations_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        
        if n < 0 or r < 0:
            raise Exception('combinations_count(n, r) not defined when n or r is negative')
        if n - r < r: r = n - r
        if r < 0: return 0
        if r == 0: return 1
        if r == 1: return n
        numerator = [n - r + k + 1 for k in range(r)]
        denominator = [k + 1 for k in range(r)]
        for p in range(2,r+1):
            pivot = denominator[p - 1]
            if pivot > 1:
                offset = (n - r) % p
                for k in range(p-1,r,p):
                    numerator[k - offset] /= pivot
                    denominator[k] /= pivot
        result = 1
        for k in range(r):
            if numerator[k] > 1:
                result *= int(numerator[k])
        return result
    def combinations_with_replacement_count(n, r):
        """Return the number of selecting r pieces of items from n kinds of items allowing individual elements to be repeated more than once.
        
        Args:
            n (long): number
            r (long): number
        
        Raises:
            Exception: not defined when n or r is negative
        
        Returns:
            long: number
        """
        if n < 0 or r < 0:
            raise Exception('combinations_with_replacement_count(n, r) not defined when n or r is negative')
        elif n == 0:
            return 1
        else:
            return combinations_count(n + r - 1, r)
    from bisect import bisect_left, bisect_right
    from collections import deque, Counter, defaultdict 
    from heapq import heapify, heappop, heappush, heappushpop, heapreplace,nlargest,nsmallest 
    from copy import deepcopy, copy 
    import operator
    from operator import itemgetter 
    
    
    from functools import reduce, lru_cache
    def chmin(x, y):
        """change minimum
        if x > y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current minimum value
            y (long): potential minimum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x > y:
            x = y
            return (x, True)
        else:
            return (x, False)
    def chmax(x, y):
        """change maximum
        if x < y, x = y and return (x, True).
        convenient when solving problems of dp[i]
        
        Args:
            x (long): current maximum value
            y (long): potential maximum value
        
        Returns:
            (x, bool): (x, True) when updated, else (x, False)
        """
        if x < y:
            x = y
            return (x, True)
        else:
            return (x, False)

    from fractions import gcd 
    def gcds(numbers):
        return reduce(gcd, numbers)
    def lcm(x, y):
        return (x * y) // gcd(x, y)
    def lcms(numbers):
        return reduce(lcm, numbers, 1)
    def make_divisors(n, reversed=False):
        """create list of divisors
        
        Args:
            number (int): number from which list of divisors is created
            reversed (bool, optional): ascending order if False. Defaults to False.
        
        Returns:
            list: list of divisors
        """
        divisors = set()
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divisors.add(i)
                divisors.add(n//i)
        return sorted(list(divisors),reverse=reversed)
    
    
    
    INF = 10 ** 18
    MOD = 10 ** 9 + 7
    modpow = lambda a, n, p = MOD: pow(a, n, p) 
    def modinv(a, p = MOD):
        
        
        return modpow(a, p-2, p)
    def modinv_list(n, p = MOD):
        if n <= 1:
            return [0,1][:n+1]
        else:
            inv_t = [0,1]
            for i in range(2, n+1):
                inv_t += [inv_t[p % i] * (p - int(p / i)) % p]
            return inv_t
    def modfactorial_list(n, p = MOD):
        if n == 0:
            return [1]
        else:
            l = [0] * (n+1)
            tmp = 1
            for i in range(1, n+1):
                tmp = tmp * i % p
                l[i] = tmp
            return l
    def modcomb(n, k, fac_list = [], p = MOD):
        
        
        from math import factorial
        if n < 0 or k < 0 or n < k: return 0
        if n == 0 or k == 0: return 1
        if len(fac_list) <= n:
            a = factorial(n) % p
            b = factorial(k) % p
            c = factorial(n-k) % p
        else:
            a = fac_list[n]
            b = fac_list[k]
            c = fac_list[n-k]
        return (a * modpow(b, p-2, p) * modpow(c, p-2, p)) % p
    def modadd(a, b, p = MOD):
        return (a + b) % MOD
    def modsub(a, b, p = MOD):
        return (a - b) % p
    def modmul(a, b, p = MOD):
        return ((a % p) * (b % p)) % p
    def moddiv(a, b, p = MOD):
        return modmul(a, modpow(b, p-2, p))

    class UnionFindTree:
        """union find tree class
        TODO: fix this description...
        how to use (example):
        >>  uf = UnionFindTree(N) 
        >>  if uf.find_root(a) == uf.find_root(b):
        >>      do something
        >>  else:
        >>      do something
        >>      uf.unite(a, b)
        """
        def __init__(self, N):
            self.root = [-1] * (N+1)
            self.rank   = [0]  * (N+1)
            self.connected_num = [1] * (N+1)
    
        def find_root(self,x):
            root = self.root
            while root[x] != -1:
                x = root[x]
            return x
    
        def unite(self,x,y):
            root = self.root
            rank = self.rank
            connected_num = self.connected_num
            find_root = self.find_root
    
            rx = find_root(x)
            ry = find_root(y)
            if rx != ry:
                if rank[rx] < rank[ry]:
                    root[rx] = ry
                    rx,ry = ry,rx
                else:
                    if rank[rx] == rank[ry]:
                        rank[rx] += 1
                    root[ry] = rx       
                connected_num[rx] += connected_num[ry]

    
    
    
    
    

    def BellmanFord(N, M, ABC, vertex_start, vertex_end, value_if_inf = -1, find_shortest = False):
        """to calculate furthest or shortest length between vertex_start and vertex_end using BellmanFord algorithm
        
        Args:
            N (int): number of vertices
            M (int): number of edges
            ABC (list): [(ai, bi, ci) for _ in range(N)] where i-th edge is directed from vertex ai to vertex bi and the length is ci 
            vertex_start (int): start vertex. usually use 0.
            vertex_end (int): end vertex. usually use N-1.
            value_if_inf (int or string as you like, optional): value you want when the furthest (or shortest) distance is infinite (or -infinite). Defaults to -1.
            find_shortest (bool, optional): choose False to find furthest path. Defaults to False.
        
        Returns:
            int or string: normally int (but can be str if you set value_if_inf to str)
            
        Example:
                N, M, P = R()
                ABC = [R() for _ in range(M)]
                ABC = [(a-1, b-1, c-P) for a, b, c in ABC]
                print(BellmanFord(N, M, ABC, 0, N-1, value_if_inf = 'inf'))

        """

        def make_reachable_list(N, M, ABC, vertex_start, vertex_end):
            reachable_to_direct = defaultdict(list)
            reachable_from_direct = defaultdict(list)
            reachable_from_start = [False] * N
            reachable_to_end = [False] * N
            reachable_from_start[vertex_start] = True
            reachable_to_end[vertex_end] = True
            reachable_from_both_sides = [False] * N
            dfs_from_start = []
            dfs_to_end = []
            for a, b, c in ABC:
                reachable_to_direct[a].append(b)
                reachable_from_direct[b].append(a)
                if a == vertex_start:
                    dfs_from_start.append(b)
                    reachable_from_start[b] = True
                if b == vertex_end:
                    dfs_to_end.append(a)
                    reachable_to_end[a] = True
            while dfs_from_start:
                v = dfs_from_start.pop()
                for i in reachable_to_direct[v]:
                    if not reachable_from_start[i]:
                        reachable_from_start[i] = True
                        dfs_from_start.append(i)
            while dfs_to_end:
                v = dfs_to_end.pop()
                for i in reachable_from_direct[v]:
                    if not reachable_to_end[i]:
                        reachable_to_end[i] = True
                        dfs_to_end.append(i)
            for i in range(N):
                reachable_from_both_sides[i] = reachable_from_start[i] and reachable_to_end[i]
            return reachable_from_both_sides
        
        reachable_from_both_sides = make_reachable_list(N, M, ABC, vertex_start, vertex_end)
        
        if find_shortest:
            dist = [INF for i in range(N)]
        else:
            dist = [-INF for i in range(N)]
        
        dist[vertex_start] = 0
        for i in range(N):
            updated = False
            for a, b, c in ABC:
                if not reachable_from_both_sides[a]:
                    continue
                elif find_shortest:
                    update_condition = dist[a] + c < dist[b]
                else:
                    update_condition = dist[a] + c > dist[b]
                if dist[a] != INF and update_condition:
                    dist[b] = dist[a] + c
                    updated = True
                    if i == N-1:
                        return value_if_inf
            if not updated:
                break
        return dist[vertex_end]

    """ initialize variables and set inputs
    
        
        
    
        
        
        
        
        
        
        
    
        
        
        
        
    
        
        
    """

    
    r = lambda: sys.stdin.readline().strip()
    r_int = lambda: int(r())
    R = lambda: list(map(int, r().split()))
    Rmap = lambda: map(int, r().split())
    Rfloat = lambda: list(map(float, r().split()))
    Rtuple = lambda: tuple(map(int, r().split()))

    """ how to treat input
    
    
    
    
    
    
    
    """

    
    if sample_file:
        sys.stdin = open(sample_file)
        
    
    

    M, D = R()
    cnt = 0
    for i in range(1, M+1):
        for j in range(21, D+1):
            if j % 10 == 0 or j % 10 == 1:
                continue
            else:
                d1 = j % 10
                d10 = j//10
                if d1 * d10 == i:
                    cnt += 1
    print(cnt)
    

    
    
    

    """memo: how to use defaultdict of list
    
    Dic = defaultdict(list)
    
    Dic[x].append(y)
    
    for k, v in Dic.items():
    """
    
    """memo: how to solve binary problems
    
    >>> a = 5
    >>> bin_str_a = format(a, '
    >>> print(bin_str_a)
    0b0101 
    """
    
    """memo: how to solve the problem
    creating simple test/answer
    greed
    simple dp
    graph
    """

if __name__ == '__main__':
    main()

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

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

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

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

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


def mul_day(d):
    d1 = d % 10
    d10 = (d // 10) % 10
    if d1 < 2 or d10 < 2:
        return -1
    return d1 * d10

ans = 0

for i in range(2, M + 1):
    for j in range(2, D + 1):
        if i == mul_day(j):
            ans += 1

print(ans)

Solution (Python):
import math

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

for k in range(m):
    for l in range(d):
        i=k+1
        j=l+1
        d1=j%10
        d10=int((j-d1)/10)
        if d1>=2 and d10>=2 and d1*d10==i:
            kotae+=1

print(kotae)

Solution (Python):
import numpy as np
import math
import sys
sys.setrecursionlimit(10000000)

def main():
    M, D = map(int, input().split())
    num = 0
    for m in range(1, M + 1):
        for d in range(1, D + 1):
            if d <= 21:
                continue
            else:
                d1 = d % 10
                d2 = (d - d1) // 10
                if d1 < 2:
                    continue
                if d2 < 2:
                    continue
                if d1 * d2 == m:
                    num += 1
    print(num)



if __name__ == '__main__':
    main()

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

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

print(ans)

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

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

Solution (Python):
def main():
    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)
    
if __name__ == '__main__':
    main()

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, \
array, bisect, sys, random, time, copy, functools, os, queue, pdb
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
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 LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)


M, D = LI()

"""
20何日
1の位が2以上
30日はだめ
8/24
2*4=8

"""
if D <= 21:
    print(0)
    exit()

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

print(ans)

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

Solution (Python):
from sys import stdin
M,D = [int(x) for x in stdin.readline().rstrip().split()]
ans = 0
for i in range(M+1):
    for j in range(D+1):
        d1 = j % 10
        d10 = j // 10
        if d1 >= 2 and d10 >= 2 and d1*d10 == i:
            ans += 1
print(ans)

Solution (Python):
import sys
M, D = [int(i) for i in sys.stdin.readline().split()]
cnt = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        if d < 10:
            continue
        d = str(d)
        d_10 = int(d[0])
        d_1 = int(d[1])
        if d_1 >= 2 and d_10 >= 2 and m == d_1 * d_10:
            cnt += 1
print(cnt)

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

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, d1 = map(int, list(str(d)))
        if d1 * d10 == m and d1 >= 2 and d10 >= 2:
            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(2,10):
        for k in range(2,10):
            if j * 10 + k > D:
                continue
            if j * k == i:
                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):
        if d >= 20 and d % 10 >= 2 and (d % 10) * (d // 10) == m:
            ans += 1

print(ans)

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

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

print(ans)

Solution (Python):
import sys
m,d=map(int,input().split())
ct=0
if d<=10:
  print(0)
  sys.exit()
for i in range(10,d+1):
  l=list(str(i))
  if int(l[0])*int(l[1])<=m and 0<int(l[0])*int(l[1]) and int(l[0])>1 and int(l[1])>1:
    ct+=1
print(ct)

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

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

cnt = 0

for m in range(1, M + 1):
    for d in range(1, D + 1):
        decimal_1 = d // 10
        decimal_2 = d - (decimal_1 * 10)
        if decimal_1 > 1 and decimal_2 > 1 and m == decimal_1 * decimal_2:
            cnt += 1
            
print(cnt)

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

Solution (Python):
inpl = lambda: list(map(int,input().split()))
M, D = inpl()
ans = 0
for d in range(2,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 j in range(1, m + 1):
    for i in range(22, d + 1):
        d1, d10 = i // 10, i % 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == j:
            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=int(D%10)
        d10=int(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 i in range(1,m+1):
    for j in range(1,d+1):
        d10=j//10
        d1=j-(j//10*10)
        if i==d10*d1 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(10, d + 1):
        u, v = map(int, str(j))
        if u >= 2 and v >= 2 and u * v == i:
            ans += 1

print(ans)

Solution (Python):


from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))


def main():
    m,d = mi()
    if d < 22:
        print(0)
        exit()
    cnt = 0
    for t in range(4,m+1):
        for i in range(22,d+1):
            if i % 10 == 1 or i % 10 == 0:
                continue
            if (i // 10) * (i % 10) == t:
                cnt += 1

    print(cnt)


main()

Solution (Python):
M,D=map(int,input().split(" "))
cnt=0
for m in range(M):
    for d in range(D):
        m1=m+1
        d1=d+1
        if len(str(d1))==1:
            continue
        if int(str(d1)[0])>=2 and int(str(d1)[1])>=2 and int(str(d1)[0])*int(str(d1)[1])==m1:

            cnt+=1
print(cnt)

Solution (Python):
import sys
input = sys.stdin.readline
MOD = 998244353 
INF = 10**10

m, d = [int(item) for item in input().split()]
ans = 0
for i in range(1, m+1):
    for j in range(1, d+1):
        a = j // 10
        b = j % 10
        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 i in range(m+1):
    for j in range(d+1):
        if j//10<=1 or j%10<=1:
           continue
        if i==(j//10)*(j%10):
            cnt+=1
print(cnt)

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
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 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

M, D = MAP()

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

Solution (Python):
from collections import Counter
mod = 1000000007


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft


def main():
    m, d=map(int, input().split())
    ans = 0
    for i in range(1, m+1):
        for j in range(1, d+1):
            a = str(j)
            if len(a) != 2:
                continue
            b = 1
            for k in a:
                b *= int(k)
            if i == b and a[0] != '1' and a[1] != '1':
                
                ans += 1

    print(ans)
main()

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

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

res = 0

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

print(res)

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)[1])
        d2 = int(str(d)[0])
        if d1 >= 2 and d2 >= 2 and d1 * d2 ==m:
            ans += 1
            
print(ans)

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

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    m, d = rli()
    ans = 0
    for i in range(1, m+1):
        for j in range(1, d+1):
            d1 = j % 10
            d2 = j // 10
            if d1 < 2 or d2 < 2:
                continue
            if i == d1*d2:
                ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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 = int(day/10)
    if d1 >= 2 and d10 >= 2:
      if d1*d10 == mon:
        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):
        if int(str(j)[1]) >= 2:
            if int(str(j)[0]) >= 2:
                if int(str(j)[0]) * int(str(j)[1]) == i:
                    count += 1
print(count)

Solution (Python):
import sys, math, itertools, bisect, copy, re

from collections import Counter, deque, defaultdict
from itertools import accumulate, permutations, combinations, takewhile, compress, cycle
from functools import reduce
from math import ceil, floor, log10, log2, factorial
from pprint import pprint


input = sys.stdin.readline

INF = float('inf')
MOD = 10 ** 9 + 7
EPS = 10 ** -7
sys.setrecursionlimit(1000000)








M, D = [int(x) for x in input().split()]

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

print(cnt)

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

print(count)

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

ans = 0
for i in range(M):
    for j in range(D):
        month = i + 1
        day = j + 1
        if day//10 == 1 or day%10 == 1:
            continue
        if(month == (day//10)*(day%10)):
            ans += 1

print(ans)

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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

print (ans)

Solution (Python):

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

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

Solution (Python):
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

    import copy


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

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

    count = 0

    for month in range(1,m+1):
        for day in range(22,d+1):
            str_day = str(day)
            d_1 = int(str_day[0])
            d_2 = int(str_day[1])
            if d_1 > 1 and d_2 > 1 and d_1 * d_2 == month:
                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):
        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)