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 part(n):
    n = int(n)
    num1 = n/10
    num2 = n % 10
    return num1, num2


def final():
    months, days = map(int, input().split())

    count = 0
    for month in range(1, months+1):
        for day in range(0, days+1):
            x, y = part(day)
            x = int(x)
            y = int(y)
            if x >= 2 and y >= 2 and (x*y) == month:
                count += 1

    print(count)


if __name__ == "__main__":
    final()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m,d = (int(i) for i in input().split())
ans = 0
for i in range(4,m+1):
    for j in range(22,d+1):
        x,y = j%10,j//10
        if x>1 and y>1 and i==x*y: 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 dd in range(1,D+1):
        d_1=dd%10
        d_10=dd//10
        
        if (d_1>1 and d_10>1) and d_10*d_1==m:
            count+=1
            
print(count)

Submission status: Accepted

Solution code:
def main():
    m,d = map(int,input().split())
    if d < 22 or m < 4:
        print(0)
        exit(0)
    cnt = 0
    for i in range(2,d//10+1):
        for j in range(2,10):
            if i*10 + j > d:
                break
            if i * j <= m:
                cnt += 1
    print(cnt)

if __name__ =="__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
count = 0
for month in range(1,M+1):
    for day in range(10,D+1):
        d_10, d_1 = map(int, list(str(day)))
        if d_10*d_1 == month and d_1 > 1 and d_10 > 1:
            count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
counter = 0
for mon in range(1, m + 1):
    for day in range(1, d + 1):
        if day >= 22 and int(str(day)[0]) >= 2 and int(str(day)[1]) >= 2:
            if int(str(day)[0]) * int(str(day)[1]) == mon:
                counter += 1
print(counter)

Submission status: Accepted

Solution code:

M, D = [int(x) for x in raw_input().split(' ')]
res = 0
for i in xrange(2, 10):
    for j in xrange(2, 10):
        if i * j <= M and i * 10 + j <= D:
            res += 1
print(res)

Submission status: Accepted

Solution code:
from sys import exit, stderr, stdin
input = stdin.readline
# setrecursionlimit(10**7)

def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    M, D = [int(n) for n in input().split()]
    ans = 0
    for i in range(2,10):
        for j in range(2,10):
            for m in range(1,M+1):
                if i*10 + j <= D and i*j == m:
                    ans += 1
    print(ans)



if __name__ == "__main__":
    main()

Submission status: Accepted

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

ans = 0
if M == 1 or D < 20:
    print(0)
    quit()

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

Submission status: Accepted

Solution code:
m,d=input().strip().split(' ')
m,d=[int(m),int(d)]
c=0
for i in range(22,d+1):
  d1=str(i)
  if int(d1[1])>=2 and int(d1[1])*int(d1[0])<=m:
    c+=1
print (c)

Submission status: Accepted

Solution code:
from sys import stdin

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

if M < 4 or D < 22:
    print(0)
    exit(0)

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

print(cnt)

Submission status: Accepted

Solution code:
from sys import stdin

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

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

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

print(cnt)

Submission status: Accepted

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

    print(N)

Submission status: Accepted

Solution code:
M,D=map(int,input().split())
ans=0
for i 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==i:
            ans+=1
print(ans)

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
c= 0
l = []
for i in range(1,m+1):
    for j in range(1,d+1):
        if j%10 <2 or (j-j%10)//10 < 2:
            continue
        else:
            if (j%10)*((j-j%10)//10) == i:
                c = c+1
                l.append([i,j])
            else:
                continue
print(c)

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):
        if j >=10:
            tmp = str(j)[0]
            tmp2 = str(j)[1]
            if i == int(tmp) * int(tmp2) and int(tmp) >=2 and int(tmp2) >= 2:
                c += 1
print(c)

Submission status: Accepted

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


def check(_m, _d):
    _d_list = list(str(_d))
    if len(_d_list) <= 1:
        d10, d1 = 0, _d
    else:
        d10, d1 = map(int, _d_list)
    if d10 >= 2 and d1 >= 2 and d10 * d1 == _m:
        return 1
    return 0


count = 0
for month in range(1, M+1):
    for day in range(1, D+1):
        count += check(month, day)
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-(d//10)*10
        d10=d//10
        if (d1>=2) and (d10>=2) and (d1*d10==m):
            count+=1
print(count)

Submission status: Accepted

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


def seki(n):
    s = str(n)
    i1,i2 = int(s[0]), int(s[1])
    if i1>=2 and i2>=2:
        return i1*i2
    else:
        return -1

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

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

Submission status: Accepted

Solution code:
def seki_day(m, d):
    d10 = d // 10
    d1 = d - d10 * 10

    if d1 >= 2 and m == d10 * d1:
        return 1
    else:
        return 0

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

count = 0
for m in range(1, M + 1):
    for d in range(22, D + 1):
        count += seki_day(m, d)

print(count)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
count = 0
d10, d1 = divmod(d,10)
import sys
if d <= 21:
    print(0)
    sys.exit()
for i in range(2,d10 + 1):
    for j in range(2,10):
        for k in range(1,m+1):
            if i*10+j <= d and j*i == k:
                count += 1
print(count)

Submission status: Accepted

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

x=0

for a in range(1,m+1):
  for b in range(22,d+1):
#    print(a,b)
    if (a==(b//10)*(b%10)) and (b%10!=1):
      x+=1
#      print("hit!")
#      print(a,b)
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):
        d10 = d//10
        d1 = d % 10
        if (d10 >= 2)and(d1 >= 2)and(d1*d10 == m):
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
M,D=[int(thing) for thing in input().split(" ")]
ret=0
for i in range(D):
    d=i+1
    d_10,d_1=divmod(d,10)
    if d_10<2 or d_1<2:
        continue
    product=int(d_10*d_1)
    if product<=M:
        ret=ret+1
print(ret)

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
cnt=0
for i in range(1,d+1):
    d10=i//10
    d1=i-(10*d10)
    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
if d<22:
    print(0)
    exit()
    
else:
    d1=int(str(d)[0])
    d2=int(str(d)[1])
    for i in range(2,10):
        for j in range(2,10):
            if i*j<=m and 10*i+j<=d and j!=1:
                ans+=1

print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
M, D = [int(x) for x in 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 > 1 and d10 > 1 and d1 * d10 == m:
            count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
c=0
for i in range(10,d):
  t=1
  flag=True
  for j in list(str(i+1)):
    if int(j)<2:
      flag=False
    t*=int(j)
  if not flag:
    continue
  if t<=m and t!=0:
    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):
        D = '0' + str(D)
        if int(D[-1]) * int(D[-2]) == M and int(D[-2]) >= 2 and int(D[-1]) >= 2:
            ans-=-1


print(ans)

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
r = 0
for mi in range(1, m + 1):
    for di in range(10, d + 1):
        if mi == int(str(di)[0]) * int(str(di)[1]) and int(str(di)[0]) > 1 and int(str(di)[1]) > 1:
            r += 1
print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
def main():
  M,D = map(int,input().split())
  if D < 22:
       print(0)
       return
  cnt = 0
  for i in range(D + 1):
      if 2 <= (i/10) and 2 <= (i%10) and math.floor(i/10)*(i%10) <= M:
          cnt += 1
  print(cnt)
  
main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from collections import *
import math
from bisect import *
import functools
INF = float('inf')
mod = 10**9+7

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

Submission status: Accepted

Solution code:
# coding: utf-8

def is_mul_day(m, d):
    d1 = d % 10
    d10 = d // 10

    if d1 < 2 or d10 < 2:
        return False
    else:
        return m == d1*d10

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

res = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        if is_mul_day(i, j):
            res += 1

print(res)

Submission status: Accepted

Solution code:
'''
 Author: fuad Ashraful Mehmet
 University of Asia Pacific
 created :30 Aug 2019 7.33 PM
 Category :   from Atcoder
 Problem:https: 
'''
import math



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



mySet=list()



for i in range(22,d+1):
	res=int(i/10)*(i%10)
	x=int(i/10)

	 
	if res<=m and x>1 and (i%10)>1:
		mySet.append(res)

		# print('{} {}'.format(int(i/10),i%10))




print(len(mySet))

Submission status: Accepted

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

count=0

for n in range(22,D+1):
    if (n//10)*(n%10)<=M and n%10>=2:
        count +=1

print(count)

Submission status: Accepted

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

# print("M:", M, "D:", D)

count = 0
# days = []

for m in range(1, M+1):
    for d in range(1, D+1):
        # print("m: ", m, " d: ", d, " d10: ", d/10, " d1", d%10)
        d1 = d % 10
        d10 = d // 10
        if (d1 * d10) == m and d1 != 1 and d10 != 1:
            # days.append("{}月{}日".format(m, d))
            count += 1

# for day in days:
#     print(day)
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(10,d+1):
        k = str(j)
        if int(k[0]) >= 2 and int(k[1]) >= 2:
            if i == 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(1,m+1):
    for j in range(1,d+1):
        j=str(j)
        if len(j)==2 and i==int(j[0])*int(j[1]) and int(j[0])>=2 and int(j[1])>=2:
            ans+=1
            #print(i,j)
print(ans)

Submission status: Accepted

Solution code:
M,D = map(int,input().split())
num = 0
for i in range(1,M+1):
        for j in range(22,D+1):
                lis = list(str(j))

                if int(lis[0])<=1 or int(lis[1])<=1:
                        lis =[]
                        continue
                if int(lis[0])*int(lis[1]) == i:
                        num+=1
                lis =[]                
print(num)

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(1, D+1):
            d1 = d % 10
            d10 = d // 10
            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())
if m < 4 or d < 22:
  print("0")
else:
  res=0
  for i in range(22, d+1):
    d1, d2 = int(i/10), i%10
    if d2 < 2:
      continue
    res += 1 if d1*d2<=m else 0
  print(res)

Submission status: Accepted

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

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)
        da = d[0]
        db = d[1]
        if int(db) < 2:continue
        if m == int(da)*int(db):
            ans += 1
print(ans)

Submission status: Accepted

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

def f(m, d):
  d1, d10 = d % 10, d // 10
  return d1 >= 2 and d10 >= 2 and d1 * d10 == m

count = 0
for i in range(1, M+1):
  for j in range(1, D + 1):
    count += 1 if f(i, j) else 0

print(count)

Submission status: Accepted

Solution code:
M,D=map(int,input().split())
ans=0
for d in range(2,D+1):
	(a,b)=divmod(d,10)
	if b<2 or a<2:
		continue
	elif a*b <=M:
		ans+=1
print(ans)

Submission status: Accepted

Solution code:
M,D =map(int,input().split())
count = 0
for i in range(M):
  for j in range(D-21):
    a = int((j+22)/10)
    b = (j+22) - (a*10)
    if a >=2 and b>=2 and i+1 == a * b:
      count += 1
print(count)

Submission status: Accepted

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

res = 0

for i in range(1, a+1):
    for j in range(1, b+1):
        ten, one = (j // 10), j % 10
        if ten >= 2 and one >= 2 and ten * one == i:
            res += 1

print(res)

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

Submission status: Accepted

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

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

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

		e =j%10
		f = j//10
		g = e*f

		if e >= 2:
			if g==i:
				ans+=1

print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    M,D = inputMap()
    ans = 0
    
    for i in range(2,M+1):
        for j in range(10,D+1):
            tmp = str(j)
            
            d1 = int(tmp[1])
            d10 = int(tmp[0])
            
            if d1 >= 2 and d10 >= 2 and d1 * d10 == i:
                #print("{}月 {} {}".format(i,d10,d1))
                ans += 1
                
    print(ans)
    
    
    
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
def solve(m, d):
    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
    return ans

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

Submission status: Accepted

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

Submission status: Accepted

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

count = 0

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

print(count)

Submission status: Accepted

Solution code:
M,D = map(int,input().split())
cnt = 0
if D > 21 and M > 3:
  for m in range(4,M+1):
    for d in range(22,D+1):
      a,b = divmod(d,10)
      if a > 1 and b > 1:
        if m == a*b:
          cnt += 1
      
print(cnt)

Submission status: Accepted

Solution code:
mo = input().split()
shi = int(mo[1][0]) 
mo1 = [int(i) for i in mo]
if mo1[1] < 22:
    print (0)
else:
    cao = 0
    for i in range(2, mo1[0] + 1):
        for j in range(2, shi + 1):
            if i % j == 0:
                if i // j in range(2, 10) and ((j * 10 + i // j) <= mo1[1]):
                    cao += 1    
    print (cao)

Submission status: Accepted

Solution code:
m = list(map(int,input().split()))
count = 0
for i in range(m[1]+1):
    for j in range(m[0]+1):
        k = str(i)
        k = k.rjust(2, '0')
        if int(k[0])*int(k[1]) == j and int(k[0]) >=2 and int(k[1]) >= 2 :
            count = count + 1
        else:
            count = count

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(22, d+1):
    num = str(i)
    d_1 = int(num[-1])
    d_10 = int(num[-2])
    if 0 < d_1 * d_10 <= m and d_1 > 1 and d_10 > 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
cnt = 0
mlist = list(range(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 in mlist:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
M,D=map(int,input().split())
count=0
if D < 20:
    print(count)
else:
    for m in range(1,M+1):
        for d in range(20,D+1):
            a = d//10
            b = d%10
            if b>1 and a*b==m:
                count+=1
    print(count)

Submission status: Accepted

Solution code:
M_D = list(map(int,input().split()))
answer=0
for m in range(1,M_D[0]+1):
    for d in range(1,M_D[1]+1):
        d1 = d%10
        d10 = d//10

        if d1*d10==m and d1>=2 and d10>=2:
            #print(d1,d10)
            answer+=1
print(answer)

Submission status: Accepted

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

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

count = 0

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
import math

m, d = map(int, input().split())
ans = 0
for i in range(d+1):
    d_10 = math.floor(i/10)
    d_1 = i-(d_10*10)
    #print(d_10, d_1)
    if d_10<2 or d_1<2:
        continue
    #print(d_1*d_10)
    if m >= d_1*d_10:
        #print(d_10,d_1)
        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):
    d1 = int((j+1)%10)
    d10 = int((j+1)/10)
    if(d1>=2 and d10>=2 and i+1==d1*d10):
      ans = ans + 1
print(ans)

Submission status: Accepted

Solution code:
M,D= map(int, input().split())
S=0
for x in range(4,M+1):
    for y in range(22,D+1):
        d10=y//10
        d1=y%10
        if d1*d10==x and d1>=2:
            S=S+1
print(S)

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 = d//10
        d2 = d - d1*10
        if d1 > 1 and d2 > 1:
            if d1*d2 == m:
                ans += 1

print(ans)

Submission status: Accepted

Solution code:
M, D = [int(i) for i in input().split()]
cnt = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d10 = d // 10
        d1 = d % 10
        if d10 >= 2 and d1 >= 2 and d10*d1 == m:
            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):
        d1, d10 = j % 10, j // 10
        if d1 >= 2 and d10 >= 2 and d1 * d10 == i:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
import  sys

M,D = (int(i) for i in input().split()) 

if D<=20:
	print(0)
	sys.exit()

ans=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力が横に一行並んでるときはこうする↓
M,D = input().split()
 
count = 0
for i in range(2,int(D)+1):
    if len(str(i)) == 2:
        x = str(i)
        y = x[0:1]
        z = x[1:2]
        for j in range(2,int(M) + 1):
            if int(y) * int(z) == j and int(z) != 1 and int(y) != 1:
                count += 1
print(count)

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 :
      continue
    str_j = str(j)
    d1, d2 = int(str_j[0]), int(str_j[1])
    if d1 < 2 or d2 < 2 :
    	continue
    temp = d1 * d2
    if temp == i :
      count+=1
print(count)

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

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

print(answerCount)

Submission status: Accepted

Solution code:
import math;

def swap(a,b):
    return (b,a)

def gcd(a,b):
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

count = 0
for i in range(m):
  for j in range(d):
    j = j+1
    sj = str(j)
    if j >= 22:
      j1 = int(sj[-1])
      j2 = int(sj[-2])
      if j1 >= 2 and j2 >= 2:
        if i+1 == j1*j2:
          count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
S = input().split()
M = int(S[0])
D = int(S[1])
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:
            if d1 * d10 == m:
                count += 1

print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-



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

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
ans = 0
for month in range(1,m+1):
  for day in range(10,d+1):
    d1 = int(str(day)[0])
    d10 = int(str(day)[1])
    if month == d1 * d10 and d1 != 1 and d10 != 1:
      ans += 1
      
print(ans)

Submission status: Accepted

Solution code:

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