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

cnt = 0

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

print(ans)

Submission status: Accepted

Solution code:
def A():
    temp = input().split()
    M = int(temp[0])
    D = int(temp[1])

    if D<22:
        print(0)
        return
    
    ans = 0

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

A()

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
w = str(D)
ans = 0
if len(w) == 2:
    d2 = str(w[0])
    d1 = str(w[1])
else:
    print(ans)
    exit()

for m in range(1, M+1):
    for a in range(1, int(d2)+1):
        for b in range(10):
            if a == int(d2) and int(d1) < b:
                continue
            if m == a * b and a >= 2 and b >= 2:
                ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys, math
from collections import deque

readline = sys.stdin.readline

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

count = 0
for m in range(1, M + 1):
    for d in range(2, D + 1):
        dstr = str(d)
        if len(dstr) != 2:
            continue
        d1 = int(dstr[1])
        d2 = int(dstr[0])
        if d1 < 2 or d2 < 2:
            continue
        if d1 * d2 == m:
            count += 1


print(count)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:

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

dates = [i for i in range(1, d+1) if i>=22 and i%10>1]

count=0
for date in dates:
  d1,d2 = str(date)
  d1 = int(d1)
  d2 = int(d2)
  if d1*d2<=m:
    count+=1
print(count)

Submission status: Accepted

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

M = int(m)
D = int(d)
count = 0
for i in range(1, M + 1):
    for j in range(1, D + 1):
        if j < 10:
            continue
        else:
            d1 = int(j % 10)
            d10 = int(j / 10)
            if d1 < 2 or d10 < 2:
                continue

            if i == d1 * d10:
                count += 1

print(count)

Submission status: Accepted

Solution code:
import sys


def main():
    m, d = [int(s) for s in sys.stdin.readline().strip().split()]

    ans = 0
    for month in range(1, m+1):
        for day in range(22, d+1):
            if (day % 10) > 1 and (day // 10) > 1:
                if (day % 10) * (day // 10) == month:
                    ans += 1
    print(ans)


main()

Submission status: Accepted

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

"""
d10 = D // 10
d1  = D %  10
ans = 0

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

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(1,D+1):
    if d < 11:
      continue
    d1,d2 = map(int,list(str(d)))
    if d1*d2 == m and d1 != 1 and d2 != 1:
      ans += 1
print(ans)

Submission status: Accepted

Solution code:
inStr = input().split()
M = int(inStr[0])
D = int(inStr[1])

count = 0

for i in range(1, M+1):
  for j in range(1,D+1):
    q, mod = divmod(j, 10)
    if q >= 2 and mod >= 2:
      if i == q * mod:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
if d<=21:
  print(0)
  exit()
hi=0
for month in range(1,m+1):
  for day in range(22,d+1):
    day_str=str(day)
    d1=int(day_str[1])
    d10=int(day_str[0])
    if d1==1 or d10==1:
      continue
    if d1*d10==month:
      hi+=1
print(hi)

Submission status: Accepted

Solution code:
M,D= list(map(int, input().split()))
ans=0
for i in range(M):
    for j in range(22,D+1):
        if str(j)[1]=='0' or str(j)[1]=='1':
            continue
        elif i+1==int(str(j)[0])*int(str(j)[1]):
            ans+=1
print(ans)

Submission status: Accepted

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

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

count = 0
for month in range(1, m+1):
    for day in range(22, d+1):
        str_day = str(day)
        d1 = int(str_day[0])
        d2 = int(str_day[1])
        if d1 <= 1 or d2 <=1:
            continue
        if d1 * d2 == month:
            count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
m, d = [int(i) for i in input().split()]
counter = 0
for i in range(1, m + 1):
    for j in range(2, 10):
        for k in range(2, 10):
            day = 10 * j + k
            if day > d:
                continue
            if i == j * k:
                counter += 1
print(counter)

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]
"""for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:"""
def wi(): return list(map(int, sys.stdin.readline().split()))
def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]#WideIntPoint
def ws(): return sys.stdin.readline().split()
def i(): return int(sys.stdin.readline())
def s(): return input()
def s_list(): return list(input())
def hi(n): return [i() for _ in range(n)]
def hs(n): return [s() for _ in range(n)]#HeightString
def mi(n): return [wi() for _ in range(n)]#MatrixInt
def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]#NumberGrid
def mip(n): return [wip() for _ in range(n)]
def ms(n): return [ws() for _ in range(n)]
def grid(n): return [s_list() for _ in range(n)]

m, d = wi()

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

Submission status: Accepted

Solution code:
def resolve():
    M,D=map(int,input().split())
    count=0
    for j in range(1,M+1):
        for i in range(1,D+1):
            if i<10: continue
            s1=int(str(i)[0])
            s2=int(str(i)[1])
            if s1>1 and s2>1:
                if s1*s2==j:
                    count+=1
    print(count)
resolve()

Submission status: Accepted

Solution code:
#N = int(input())
M,D = map(int,input().split())
cnt = 0
for m in range(2,M+1):
    for i in range(2,10):
        if m%i == 0:
            day = m//i
            if day < 10:
                if day > 1:
#                    print(m,i,day)
                    if (i + 10*day) <= D:
#                        print(i + 10*day)
                        cnt += 1
#                    if (day + 10*i) <= D:
#                        print(day + 10*i)
#                        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
input_data = input().split(" ")
M = int(input_data[0])
D = input_data[1]

cnt = 0
for i in range(1,M + 1):
  for j in range(22, int(D) + 1):
    if i == int(str(j)[0]) * int(str(j)[1]) and int(str(j)[1]) != 0  and int(str(j)[1]) != 1:
      cnt += 1
    else:
      pass

print(cnt)

Submission status: Accepted

Solution code:
ori_month, ori_day = map(int, input().split())

def p_day_check(month, day):
    d1 = day % 10
    d10 = day // 10
    if d1 >= 2 and d10 >= 2 and d1 * d10 == month:
        return True
    else:
        return False

product_day = 0

for month in range(1, ori_month+1):
    for day in range(1, ori_day+1):
        if p_day_check(month, day):
            product_day += 1

print(product_day)

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 :
            buf = str(j)
            d_1 = int(buf[-1])
            d_10 = int(buf[-2])

            if d_1 >= 2 and d_10 >= 2 and int(d_1 * d_10) == i:
                ans += 1
print(ans)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

Solution code:
 # -*- coding: utf-8 -*-
# スペース区切りの整数の入力
M, D = map(int, input().split())
result =0
for i in range(4,M+1):
    for j in range(22, D+1):
        d1 =(j % 10)
        d2 =(j // 10)
        if d1 <2 or d2<2 or (d1*d2!=i):
            continue
        result += 1
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

	dic = {}
	for row in range(11, D+1):
		if int((row%10)) < 2 or int((row/10)) < 2:
			continue
		num = int((row%10))*int((row/10))
		if num in dic:
			dic[num] += 1
		else:
			dic[num] = 1
	
	counter = 0
	for key in range(M+1):
		if key in dic:
			counter += dic[key]
	
	print(counter)


if __name__ == "__main__":
	main()

Submission status: Accepted

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

cnt = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        if d < 10:
            continue
        d1 = d % 10
        d10 = d // 10
        if d1 >=2 and d10 >=2 and m == d1 * d10:
            cnt += 1
            # print("{} {}".format(m, d))

print(cnt)

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
ans = 0
if d<22:
  None
else:
  for i in range(2, 10):
    for j in range(2, 10):
      if 10*i+1*j <= d:
      	if i*j <= m:
        	ans += 1
print(ans)

Submission status: Accepted

Solution code:
M, D = input().split(" ")
M = int(M)
D = int(D)
count = 0
for j in range(1, M+1):
    for i in range(10, D+1):
        d2 = i // 10
        d1 = i - (d2 * 10)
        if(d1 >= 2 and d2 >= 2):
            if (d1 * d2 == j):
                count += 1
print(count)

Submission status: Accepted

Solution code:
import math

M,D = input().split()
M = int(M)
D = int(D)
cnt = 0

for i in range(4,M+1):
    for j in range(22,D+1):
        d1 = j%10
        d10 = math.floor(j/10)
        if d10 >= 2 and d1 >= 2 and d1 * d10 == i:
            cnt += 1
print(cnt)

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
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 = int((j%100-j%10)/10)
    if j1>1 and j2>1 and j1*j2==i:
      cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
M,D=map(int,input().split())
if D<21:
        print('0')
else:
        ans=0
        for i in range(22,D+1):
                d10=int(str(i)[0])
                d1=int(str(i)[1])
                if d10<2 or d1<2:
                        pass
                else:
                        if d10*d1<=M:
                                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(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())
cnt = 0

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

print(cnt)

Submission status: Accepted

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

matched = []
for i in range(22, D+1):
    d10 = int(i / 10)
    d1 = int(i % 10)
    if d10 < 2 or d1 < 2:
        continue
    if d10 * d1  <= M:
        matched.append((d10*d1, i))
print(len(matched))

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = 0

for i in range(2,m+1):
    for j in range(2,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:
m,d = map(int,input().split())
ans = 0
if d < 22:
    print(ans)
    exit(0)
for i in range(22,d+1,1):
    #print(i)
    for j in range(1,m+1):
        if (i//10)*(i%10) == j:
            if (i%10) >= 2:
                ans +=1
print(ans)

Submission status: Accepted

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

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

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

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

print(ans)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

Solution code:
def main():
    M, D = map(int, input().split())
    count = 0

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
ans = 0
for i in range(m):
    m = i+1
    for j in range(d-19):
      d = j+20
      d1 = int(d/10)
      d2 = d%10
      if d2 > 1 and m == d1*d2:
          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):
        d10, d1 = divmod(d, 10)
        if d10 < 2 or d1 < 2:
            continue
        if d1 * d10 == m:
            count += 1

print(count)

Submission status: Accepted

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

for i in range(1, m+1):
    for j in range(22, 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:
M, D = map(int, input().split())

result = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        if m >= 4 and d >= 22:
            d10, d1 = map(int, str(d))
            if d10 >= 2 and d1 >= 2 and d1 * d10 == m:
                result += 1
print(result)

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):
        d1 = d%10
        d10 = int((d-d1)/10)

        if d1 >= 2 and d10 >= 2 and d1*d10 == m:
            c+=1
print(c)

Submission status: Accepted

Solution code:
import numpy as np

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

if D < 22:
    print(0)
    
else:
    d = np.arange(22, D+1)
    m = np.arange(1, M+1)
    ans = 0
    
    for i in d:
        if i % 10 != 1:
            i1 = i % 10
            i10 = i // 10
            if np.any(m==i1*i10):
                ans += 1
                
    print(ans)

Submission status: Accepted

Solution code:

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

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

count = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        if j < 20:
            continue

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

def solve(m, d):
    ans = 0
    if d < 22:
        print(ans)
        return

    for m_i in range(1, m+1):
        for d_i in range(22, d+1):
            if d_i % 10 < 2:
                continue
            if m_i == (d_i // 10) * (d_i % 10):
                # print(m_i, d_i)
                ans += 1
    print(ans)

if __name__ == '__main__':
  m, d = map(int, sys.stdin.readline().strip().split(" "))
  solve(m, d)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
a = list(map(int,input().split())) #input from array of integer like "1 2 3"

day = a[1]
cnt = 0

for x in range(day+1):
  if x >10:
    if int(str(x)[0]) >= 2 and int(str(x)[1]) >=2:
      if int(str(x)[0]) * int(str(x)[1]) <= a[0]:
        cnt += 1
        #print("{}/{}".format(int(str(x)[0]) * int(str(x)[1]), x))

print(cnt)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

print(sum([m==(d-d%10)*(d%10)/10 for m in range(1,M+1) for d in range(1,D+1) if (d-d%10)/10>=2 and d%10>=2]))

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for m in range(1, M+1):
  for d in range(1, D+1):
    # m 月 d 日
    dd = str(d)
    if len(dd) == 2:
      d10, d1 = int(dd[0]), int(dd[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())

ans = 0

for i in range(m):
    for j in range(d):
        d10 = int((j+1)/10)
        d1 = j+1-d10*10
        if d1 >= 2 and d10 >= 2 and d1*d10 == i+1:
            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):
        if j >= 22:
            one = int(str(j)[1])
            ten = int(str(j)[0])
            if one >= 2 and ten >= 2:
                if one * ten == i:
                    count += 1
                    
print(count)

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):
    d_1=d%10
    d_10=int(d/10)
    #print(m, d_10, d_1)
    if(d_1 >= 2 and d_10 >= 2 and d_1*d_10 == m):
      count+=1

print(count)

Submission status: Accepted

Solution code:
M,D=map(int,input().split())
ans=0
try:
  for d in range(22,D+1):
    for m in range(1,M+1):
      D1=d//10
      D2=d-10*D1
      if D1*D2==m and D1>=2 and D2>=2:
        ans+=1
except:
  pass
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(20, D+1):
        d = str(j)
        d10 = int(d[0])
        d1 = int(d[1])
        if i == d10 * d1 and d1 >= 2 and d10 >= 2:
            count = count + 1

print(count)

Submission status: Accepted

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

count = 0

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

        if int(d[0]) * int(d[1]) == m:
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 >= 2 and j//10 >= 2 and int(j%10)*int(j//10) ==i:
                ans += 1
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(1, m+1):#M月までの計算
    for j in range(10, d+1):
        d1=int(str(j)[0])
        d10=int(str(j)[1])
        if d1>=2 and d10>=2 and d1*d10==i:
            ans=ans+1

print(ans)

Submission status: Accepted

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

result = 0

if D < 22:
    print(0)
else:
    for m in range(1, M+1):
        for d in range(22, D+1):
            d1 = d%10
            d10 = d//10
            if d1 > 1 and d1*d10 == m:
                result += 1
    print(result)

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

d10 = 2
d = 2

ans = 0

flag = 0
while True:
    if flag == 1:
        break
    while True:
        if d10*10 + d > D:
            flag = 1
            break
        if d >= 10:
            break
        if d10*d <= M:
            ans += 1
        d += 1
    d10 += 1
    d = 2

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
tmp=input().split()
M,D=tmp[0],tmp[1]

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

p = itertools.product(range(1, M+1), range(1, D+1))
c = 0
t_list = []
for m, d in p:
    d_10, d_1 = str(d).zfill(2)
    if int(d_10) == 1 or int(d_1) == 1:
        continue
    if m == int(d_10) * int(d_1):
        c += 1
        t_list.append((m, d_10, d_1))
print(c)

Submission status: Accepted

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

counter = 0

for im in range(1, m+1):
  for id in range(1, d+1):
    if (id // 10 < 2 or id % 10 < 2):
      continue
    if (im == (id // 10) * (id % 10)):
        counter += 1
        
print(counter)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

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

input = lambda: stdin.readline()[:-1]
main()

Submission status: Accepted

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

count = 0

if d <= 10:
    print(0)
    exit()
for j in range(4, m+1):
    for i in range(22, d+1):
        i = list(str(i))
        d1 = int(i[0])
        d2 = int(i[1])
        if d1 == 1 or d2 == 1:
            continue
        if d1*d2 == j:
            count += 1

print(count)

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

Submission status: Accepted

Solution code:
m, d = map(int, input().split(' '))
res = 0
if d <= 21:
    pass
else:
    for i in range(1, m+1):
        for j in range(22, d+1):
            ten, one = divmod(j, 10)
            if one >= 2 and i == ten*one:
                res = res + 1
                
print(res)