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



Sample input:
15 40


Sample output:
10

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
ans = 0
for m in range(M+1):
    for d in range(10, D+1):
        d1 = int(str(d)[0])
        d2 = int(str(d)[1])
        if d1 > 1 and d2 > 1 and m == d1 * d2:
            ans += 1
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
count = 0
if D >= 22:
  for i in range(22, D + 1):
    j = str(i)
    if int(j[1]) >= 2:
      m = int(j[0]) * int(j[1])
      if m <= M:
        count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
m,d  =map(int,input().split())
count = 0
for i in range(1,m+1):
    for j in range(d+1):
        if j < 22 or j%10<2:
            continue
        else:
            a = str(j)
            if int(a[0])*int(a[1])==i:
                count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#import pysnooper
#import numpy
#import os,re,sys,operator
#from collections import Counter,deque
#from operator import itemgetter,mul
#from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations
from sys import stdin,setrecursionlimit
#from bisect import bisect_left,bisect_right
#from copy import deepcopy
#import heapq
#import math
#import string
#from time import time
#from functools import lru_cache,reduce
#from math import factorial,hypot
#import sys
#from fractions import gcd
setrecursionlimit(10**6)
input=stdin.readline

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

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
count = 0
for m in range(1, M + 1):
    for d in range(10, D + 1):
        d_1 = d % 10
        d_10 = d //10
        count += (d_1 * d_10 == m and d_1 > 1 and d_10 > 1)

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

ans = 0
for i in range(4, m+1):
    for j in range(22, d+1):
        d_0 = j % 10
        d_10 = j // 10
        if d_0 == 1 or d_10 == 1:
            continue
        if d_0 * d_10 == i:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
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)

Submission status: Accepted

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

print(t_cnt)

Submission status: Accepted

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

Submission status: Accepted

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

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

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


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

    return r


print(main())

Submission status: Accepted

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

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
import sys


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

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

		if d_1 < 2 or d_10 < 2:
			continue

		if d_1 * d_10 == i:
			cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
ans = 0
for i in range(1,m+1):
  for j in range(10,d+1):
    if "1" in list(str(j)):
      continue
    j1 = j//10
    j2 = j%10
    if i == j1*j2:
      ans += 1
print(ans)

Submission status: Accepted

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

ans = 0

for i in range(2,m+1):
	for j in range(d+1):
		if i==j//10*(j-(j//10)*10) and j>=20 and j-(j//10)*10>=2:
			#print(i,j)
			ans = ans + 1
			#print(j//10,(j-(j//10)*10))
print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
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
def examA():
    M, D = LI()
    c = D//10
    ans = 0
    for i in range(2,M+1):
        d = make_divisors(i)
#        print(d)
        for j in range(len(d)//2):
            cur0 = d[j*2+1]; cur10 = d[j*2]
            if cur10==1:
                continue
            if cur0<=9:
                if cur10<c:
                    ans +=1
#                    print(cur10,cur0)
                elif cur10==c and cur0+cur10*10<=D:
                    ans +=1
#                    print(cur10,cur0)
        for j in range(len(d) // 2):
            cur0 = d[j * 2];cur10 = d[j * 2+1]
            if cur0 == 1:
                continue
            if cur10 <= 9:
                if cur10 < c:
                    ans += 1
                elif cur10 == c and cur0 + cur10 * 10 <= D:
                    ans += 1
        if len(d)%2==1:
            cur0 = d[-1]; cur10 = d[-1]
            if cur10==1:
                continue
            if cur0<=9:
                if cur10<c:
                    ans +=1
#                    print(cur10,cur0)
                elif cur10==c and cur0+cur10*10<=D:
                    ans +=1
#                    print(cur10,cur0)
    print(ans)
    return

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

if __name__ == '__main__':
    examA()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

print(cnt)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys

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

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

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

print(answer)

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
count = 0
for i in range(1, m+1):
  for j in range(22, d+1):
    d1 = j % 10
    if d1 <= 1:
      continue
    d2 = int(j / 10)
    if d1 * d2 == i:
      count += 1
      #print(str(i) + " " + str(j))
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0

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

print(cnt)

Submission status: Accepted

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

mainFunc()

Submission status: Accepted

Solution code:
#coding:utf-8
m, d = map(int, input().split())
ans = 0

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

  if i1 >= 2 and i10 >= 2 and i1*i10 <= m:
    ans += 1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


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

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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
cnt = 0
for m in range(1, M + 1):
    for d in range(22, D + 1):
        d1, d10 = int(str(d)[1]), int(str(d)[0])
        if d1 >= 2 and d1 * d10 == m:
            cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

numOfSekinohi = 0

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

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
M, D = map(int, input().split())

ans = 0

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M,D = map(int,input().split())
ans = 0
for d in range(22,D+1):
    s = str(d)
    if s[1]<"2":continue
    for m in range(1,M+1):
        if eval(s[0]+"*"+s[1])==m:
            ans+=1
print(ans)

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
count = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        d_s = str(j)
        if len(d_s) == 1 or int(d_s[0]) < 2 or int(d_s[1]) < 2:
            continue
        elif i == int(d_s[0])*int(d_s[1]):
            count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

count = 0

if M < 4 or D < 22:
  print(0)
else:
  for i in range(4,M+1):
    for j in range(22,D+1):
      d = list(str(j))
      if int(d[0]) < 2 or int(d[1]) < 2:
        continue
      if i == int(d[0])*int(d[1]):
        count += 1
      
    
  
  print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
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 - d1) // 10
        if d1 < 2 or d10 < 2:
            continue
        if m == d1 * d10:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
cn = 0

for i in range(1,d+1):
    tt = 0
    if((i%10)>=2 and i//10>=2):
        tt = (i%10)*(i//10)
    if(tt<=m and tt>=1):
        cn+=1
        #print(i%10,i//10)
    
print(cn)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(M: int, D: int):
    ans = 0

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

    print(ans)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    M = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    solve(M, D)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
      m=i
      d10=int(str(j)[0])
      d1=int(str(j)[1])
      if d10>=2 and d1>=2 and m==d10*d1:
        ans+=1
print(ans)

Submission status: Accepted

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


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

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

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