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: Wrong Answer

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

for i in (2,D//10+1):
  if i<D//10:
    result+=M//i-1
  else:
    if D%10>=2:
      result+=min(M//i,D%10)-1
print(result)

Submission status: Wrong Answer

Solution code:
data = input().split(" ")

M = int(data[0])
D = int(data[1])


# 結果用変数
count = 0

# 1月からm月
for i in range(M):
    i += 1
    # 1日からd日
    for j in range(D):
        j += 1
        
        print(i,"/",j)
        # 二桁チェック
        if j >= 10:
            d_1 = int(str(j)[:1])
            d_10 = int(str(j)[1:])
            if d_1 >= 2 and d_10 >= 2:
                if d_1 * d_10 == i:
                    count += 1
print(count)

Submission status: Wrong Answer

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

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

print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
if d<22:
  print(0)
else:
  ans=0
  for M in range(m+1)[1:]:
    for D in range(d+1)[22:]:
      q=D%10
      r=(D-q)//10
      if r>=2 and q>=2 and M==q*r:
        ans += 1
        print(M,D,r,q)
  print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import numpy as np
from operator import itemgetter

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

D10=D//10
D1=D%10

ans=0
for i in range(2,D10):
    for j in range(2,10):
        if i*j<=M:
            ans+=1
i=D10
if i < 2:
    print(0)
else:
    for j in range(2,D1):
        if i*j<=M:
            ans+=1

    print(ans)

Submission status: Wrong Answer

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

count = 0

for day in range (2,d+1):
    for month in range(2,m+1):
        d_1 = day%10
        d_10 = day//10
        
        if (d_1 <= 1) or (d_10 <= 1):
          break

        if (d_1 * d_10) == month:
            count += 1
            print(d_1,d_10)

print(count)

Submission status: Wrong Answer

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

Futaketa_max = D//10
Hitoketa_max_max = D % 10

counter = 0
for t in range(M):
  m = t+1
  for i in range(Futaketa_max):
    if m % (i+1) ==0 and m / (i+1) >=2:
      d2 = m / (i+1)
      if m/d2 >=2:
        if i+1 == Futaketa_max:
          if d2 <= Hitoketa_max_max:
            #print(m, i+1,d2,'1')
            counter += 1
        else:
          #print(m, i+1,d2,'2')
          counter += 1
print(counter)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
if d<22:
  print(0)
else:
  t=d//10
  o=d-(t*10)
  i=2
  ans=0
  while i<t and i*2<=m:
    j=2
    while j*i<=m and j < 10:
      ans+=1
      j+=1
    i+=1
  print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 24 21:04:16 2019

@author: Toroi0610
"""

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

M, D = map(int, "15 40".split())
day = [str(d) for d in range(1, D+1)]
cnt = 0
for m in range(1, M+1):
    s = make_divisors(m)
    length = len(s)
    if length == 1:
        continue
    if length%2 == 0:
        for l, r in zip(s[:int(length/2)], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    cnt += 1
                if str(r)+str(l) in day:
                    cnt += 1
    else:
        for l, r in zip(s[:int(length/2)+1], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    cnt += 1
                if l != r:
                    if str(r)+str(l) in day:
                        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
m, d = map(int, input().split())
count = 0
for i in range(m+1):
    if i ==0 or i ==1:
        pass
    else:
        for j in range(d+1):
            if j < 22:
                pass
            else:
                l = list(str(j))
                n = 1
                for k in l:
                    n = n*int(k)
                if n == i and n > 3:
                    count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m, d = map(int, raw_input().split())
c = 0
for d1 in range(2, 10):
    for d10 in range(2, d/10):
        if d1+10*d10 <= d and d1*d10 <= m:
            #print(d1+10*d10)
            #print(d1*d10)
            c +=1
print(c)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 24 21:04:16 2019

@author: Toroi0610
"""

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

M, D = map(int, "15 40".split())
#d_1, d_10 = int(D[0]), int(D[1])
day = [str(d) for d in range(1, D)]
cnt = 0
for m in range(1, M+1):
    s = make_divisors(m)
    length = len(s)
    if length == 1:
        continue
    if length%2 == 0:
        for l, r in zip(s[:int(length/2)], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    cnt += 1
                if str(r)+str(l) in day:
                    cnt += 1
    else:
        for l, r in zip(s[:int(length/2)+1], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    cnt += 1
                if l != r:
                    if str(r)+str(l) in day:
                        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:

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

ans = 0

for m in range(M):

    m += 1

    for d in range(D):

        if d < 100 and d >= 10:

            d10 = d // 10
            d1  = d % 10

            if d10 >= 2 and d1 >= 2 and d10 * d1 == m:

                ans += 1

print (ans)

Submission status: Wrong Answer

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

for i in range(4, m + 1):
  if i > 81:
    break
  for j in range(22, d + 1):
    d12 = list(str(j))
    if int(d12[0]) * int(d12[1]) == i:
      count += 1
      
print(count)

Submission status: Wrong Answer

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

count = 0
for m in range(4,M):
  for d in range(22,D):
    d1 = d%10
    d10 = int(d/10)
    if d10*d1 == m:
      count += 1

print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 24 21:04:16 2019

@author: Toroi0610
"""

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

M, D = map(int, "15 40".split())
#d_1, d_10 = int(D[0]), int(D[1])
day = [str(d) for d in range(1, D)]
cnt = 0
for m in range(1, M+1):
    s = make_divisors(m)
    length = len(s)
    if length == 1:
        continue
    if length%2 == 0:
        for l, r in zip(s[:int(length/2)], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    print(m, l, r)
                    cnt += 1
                if str(r)+str(l) in day:
                    print(m, r, l)
                    cnt += 1
    else:
        for l, r in zip(s[:int(length/2)+1], s[int(length/2):][::-1]):
            if (l > 10) or (r > 10) or (l==1):
                continue
            else:
                if str(l)+str(r) in day:
                    print(m, l, r)
                    cnt += 1
                if l != r:
                    if str(r)+str(l) in day:
                        print(m, r, l)
                        cnt += 1

Submission status: Wrong Answer

Solution code:
def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

# print(is_prime(53))    
# print(is_prime(84))


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

counter = 0





if D >= 22:
	for i in range(M):
		if not is_prime(i+1):
			for j in range(22,D+1):
			# 11~Dまでを見る
				j_0 = j%10
				j_1 = j//10

				if i+1 == j_0*j_1:
					counter += 1

print(counter)

Submission status: Wrong Answer

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

c=0
if d<22:
    print(0)
else:
    for j in range(m):
        for i in range(d-22):
            d1,d10=int(str(i+23)[1]),int(str(i+23)[0])
            #print(d1)
            #print(d10)
            if d1>1 and d10>1 and d1*d10==j+1:
                c+=1
                #print(j+1,i+22)
    print(c)

Submission status: Wrong Answer

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

cnt = 0

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

print(cnt)

Submission status: Wrong Answer

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


def is_prime(n):
    a = []
    for i in range(2, n+1):
        for k in range(2, int(math.sqrt(i)) + 1):
            if i % k == 0:
                a.append(i)
                break

    return a

lis = is_prime(M)
b = 0

if D <22:
    print(0)
else:
    for m in lis:
        for i in range(22, D+1):
            b1 = i%10
            b10 = i//10
            if b1 * b10 == m:
                b +=1
    print(b)

Submission status: Wrong Answer

Solution code:
import sys
M, d = input().split()
if int(d)>=10:
  d10 = int(d[0])
  d1 = int(d[1])
else:
  print(0)
  sys.exit()
M = int(M)
ans = 0
for j in range(2,d10+1):
  for i in range(2,10):
    if 10*j+i>d10*10+d1:
      print(ans)
      sys.exit()
    if M >=j*i:
      ans+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M,D = map(int,input().split())
ans = 0
s = []
for i in range(4,M+1):
    if D<22:
        print(0)
        break
    elif M<4:
        print(0)
        break
    for j in range(22,D+1):
         k = str(j)
         if  int(k[0])*int(k[1]) == i:
             ans += 1
             s.append(i)
             s.append(j)
for i in range(len(s)//2):
    if s[i*2-1]%10 == 1:
        ans -= 1
print(ans)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import numpy as np
from operator import itemgetter

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

D10=D//10
D1=D%10

ans=0
for i in range(2,D10):
    for j in range(2,10):
        if i*j<=M:
            ans+=1
i=D10
for j in range(2,D1):
    if i*j<=M:
        ans+=1

print(ans)

Submission status: Wrong Answer

Solution code:
k = 0
m,d  = (int(i) for i in input().split()) 
listm = range(1,m + 1)
listd = range(1,d + 1)
for a in listm:
 for b in listd:
  #print(a,"月",b,"日")
  dt = str(b)
  da = dt[0]
  da = int(da)
  if len(dt) == 2:
   db = dt[1]
   db = int(db)
   if db >= 2:
    if da >= 2:
     if a == da * db:
      if a >= 2:
       k = k + 1
       print(a,"月",b,"日")
print(k)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
M,D = map(int, input().split())
count = 0
for month in range(4, M+1):
    if len(str(D)) == 2:
        for day in range(22,D+1):
            if int(str(day)[0]) * int(str(day)[1]) == month:
                count += 1
print(count)

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
 
M = A[0]
D = A[1]
count = 0
 
for i in range(1,M+1):
  for j in range(22,D+1):
    day = list(str(j))
    m10 = int(day[0])
    m1 = int(day[1])
    if i == m10 * m1:
      count+=1
    
  
 
print(count)

Submission status: Wrong Answer

Solution code:
M, D = map(int, input().split())
d1 = D % 10
d2 = D // 10
ans = 0
if d2 < 2:
    print(0)
    exit(0)
for i in range(2, d2):
    for j in range(2, 9):
        if i * j <= M:
            ans += 1
for j in range(2, d1 + 1):
    if d2 * j <= M:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
if d<22:
  print(0)
else:
  ans=0
  for M in range(m+1)[1:]:
    for D in range(d+1)[23:]:
      q=D%10
      r=(D-q)//10
      if r>=2 and q>=2 and M==q*r:
        ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
m, d = map(int, input().split())
if d<=22 or m<4 : print(0)
else:
    res = 0
    for i in range(22,d+1):
        i1, i10 = i%10, i//10
        if i1 < 2 or i10 < 2: continue
        elif m >= i1 * i10: res += 1
    print(res)

Submission status: Wrong Answer

Solution code:
m, d = map(int, raw_input().split())
c = 0
d1, d10 = 2, 2

for d1 in range(2, 9):
    for d10 in range(2, d/10):
        if d1+10*d10 <= d and d1*d10 <= m:
            c +=1
print(c)

Submission status: Wrong Answer

Solution code:
k = 0
m,d  = (int(i) for i in input().split()) 
listm = range(1,m+1)
listd = range(1,d)
for a in listm:
 for b in listd:
  dt = str(b)
  da = dt[0]
  da = int(da)
  if len(dt) == 2:
   db = dt[1]
   db = int(db)
   if db >= 2:
    if da >= 2:
     if a == da * db:
      if a >= 2:
       k = k + 1
       print(a,"月",b,"日")
print(k)

Submission status: Wrong Answer

Solution code:
MD = [int(i) for i in input().split()]

c = 0
for m in range(1, MD[0] + 1):
    for d in range(1, MD[1] + 1):
        if d < 22:
            continue
        d1  = d % 10
        d10 = (d - d1) /10


        if m == d1 * d10:
            #print("d-> %d,m -> %d, d1 - > %d, d10 -> %d"%(d, m,d1,d10))
            c+=1

print(c  )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
dg = input().split()
m = int(dg[0])
d = int(dg[1])
count = 0
for i in range(m + 1):
    if i !=0:
        for e in range(d):
            if(len(str(e)) >= 2):
                ee = str(e)
                d1 = int(ee[0])
                d2 = int(ee[1])
                
                if d1*d2 == i and d1 >=2 and d2>=2:
                    count = count +1

                    
                    
print(count)

Submission status: Wrong Answer

Solution code:
MD = [int(i) for i in input().split()]

c = 0
for m in range(1, MD[0] + 1):
    for d in range(1, MD[1] + 1):
        if d < 22:
            continue
        d1  = d % 10
        d10 = (d - d1) /10


        if m == d1 * d10:
            #print("d-> %d,m -> %d, d1 - > %d, d10 -> %d"%(d, m,d1,d10))
            c+=1

print(c -1 )

Submission status: Wrong Answer

Solution code:
A = list(map(int, input().split()))
 
M = A[0]
D = A[1]
count = 0
 
for i in range(4,M+1):
  for j in range(22,D+1):
    day = list(str(j))
    m10 = int(day[0])
    m1 = int(day[1])
    if i == m10 * m1:
      count+=1
    
  
 
print(count)

Submission status: Wrong Answer

Solution code:
# Takahashi Calender

# m = 12
# d = 31

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

if d < 21:
    print("0")
    exit()

if m < 2:
    print("0")
    exit()

d10 = d // 10

for cm in range(1, m+1):
    for cdex in range(2, d10):
        for cd in range(2, d+1):
            if cd * cdex == cm:
                count += 1

print(count)

Submission status: Wrong Answer

Solution code:
import sys

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

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

count = 0
for m in range(4,M+1):
  for d in range(22,D+1):
    d1 = d%10
    d10 = int(d/10)
    if d10*d1 == m:
      count += 1

print(count)

Submission status: Wrong Answer

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

if int(d) < 22 or int(m) < 4:
    print(ans)
    exit()

for i in range(4, int(m)+1):
    for j in range(22, int(d)+1):
        if i == int(str(j)[0]) * int(str(j)[1]):
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

if __name__ == '__main__':
    M, D = map(int, input().split())
    #D10 = int(D[0])
    #D1 = int(D[1])

    count = 0
    for m in range(1,M+1):
        for d in range(1,D+1):
            if d>=10:
                d_ = str(d)
                D10 = int(d_[0])
                D1 = int(d_[1])
                D_ = D10 * D1
                if m == D_ and D10>=2 and D1>=2:
                    print(d_,m)
                    count += 1
                else:
                    D_ = 0

    print(count)

Submission status: Wrong Answer

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

if M < 4:
    print('0')
else:
    for i in range(4, M+1):
        for j in range(22, D+1):
            j = str(j)
            jli = list(j)
            if jli[1] == '0' or jli[1] == '1':
                pass
            else:
                if int(jli[0])*int(jli[1]) == i:
                    cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys
inputs = sys.stdin.readlines()

M, D = map(int, inputs[0].split())

good_dates = []
for date in range(D):
    d10 = date // 10
    d1 = date % 10
    if d1 >= 2 and d10 >= 2:
        if d1*d10 <= M:
            good_dates.append((d1*d10, date))
print(len(good_dates))

Submission status: Wrong Answer

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

c=0
if d<22:
    print(0)
else:
    for j in range(m):
        for i in range(d-22):
            d1,d10=int(str(i+22)[1]),int(str(i+22)[0])
            #print(d1)
            #print(d10)
            if d1>1 and d10>1 and d1*d10==j+1:
                c+=1
                #print(j+1,i+22)
    print(c)

Submission status: Wrong Answer

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

if M < 4:
    print('0')
else:
    for i in range(4, M+1):
        for j in range(22, D+1):
            j = str(j)
            jli = list(j)
            if jli[1] == '0' or jli[1] == '1':
                pass
            else:
                if int(jli[0])*int(jli[1]) == i:
                    print(i, jli)
                    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

count = 0
for d in range(D):
    d1 = d // 10
    d2 = d % 10
    if d1 < 2 or d2 < 2:
        continue
    if d1 * d2 <= M:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
M,D = list(map(int, input().split()))
ans = 0
if M >=4:
    for i in range(4, M+1):
        if D >= 22:
            for j in range(22, D+1):
                if i == int(j/10) * int(j%10):
                    ans += 1
                    #print(str(i) + " " + str(j))
print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int, input().split())
ans = 0

for i in range(a+1):
  for j in range(b+1):
    if len(str(j)) == 2 and i >= 2 and int(str(j)[1]) >= 2 and int(str(j)[0]) >= 2:
      if i == int(str(j)[0]) * int(str(j)[1]): 
        print(str(i) +' '+ str(j))
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
M, D = map(int, input().split())
c = 0
for m in range(1,M+1):
  for d in range(22, D):
    dl = list(str(d))
    if int(dl[0]) != 0 and int(dl[0]) != 1 and int(dl[1]) != 0 and int(dl[1]) != 1:
      if int(dl[0]) * int(dl[1]) == m:
        c += 1
      
print(c)

Submission status: Wrong Answer

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

num_d = 0
for m in range(2,month+1):
    for k in range(day//100+1):
        for i in range(2,10):
            if m%i==0:
                d1 = m//i
                if i*10+d1 <= day and d1>1:
                    num_d += 1

print(num_d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

M = A[0]
D = A[1]
count = 0

for i in range(4,M+1):
  for j in range(22,D+1):
    print(j)
    day = list(str(j))
    m10 = int(day[0])
    m1 = int(day[1])
    if i == m10 * m1:
      count+=1
    
  

print(count)

Submission status: Wrong Answer

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

c=0
if d<22:
    print(0)
else:
    for j in range(m):
        for i in range(d-22):
            d1,d10=int(str(i+22)[1]),int(str(i+22)[0])
            #print(d1)
            #print(d10)
            if d1>1 and d10>1 and d1*d10==j+1:
                c+=1
                print(j+1,i+22)
    print(c)

Submission status: Wrong Answer

Solution code:
M, D = [int(x) for x in input().split()]
dates = list(range(22,D+1))
c = 0
 
for i in range(len(dates)):
  d1 = int(str(dates[i])[-1])
  d2 = int(str(dates[i])[-2])
  if d1*d2 <= M and d1 > 1 and d2 > 1:
    print(d1,d2)
    c += 1
print(c)

Submission status: Wrong Answer

Solution code:
M_D = list(map(int,input().split()))
print(M_D[0])
print(M_D[1])
date=M_D[1]
month=M_D[0]
count=0
for j in range(1,month):
    list =[]
    for i in range(10,date):
        while i > 0:
            list.append(i%10)
        list.reverse()
        if list[0]*list[1]==j:
            count+=1
    print(str(j))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a=0
if d>=22:
    for i in range(d-21):
        day=d-i
        d1=int(str(day)[1])
        d10=int(str(day)[0])
        if int(str(day)[1])!=1:
            if d1*d10<=m and d1!=0:
                print(d10,d1)
                a+=1

print(a)

Submission status: Wrong Answer

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

cnt = 0
for m in range(1, M + 1):
    for d in range(21, D):
        a = d // 10
        b = d % 10
        if b < 2:
            continue

        if a * b == m:
            cnt += 1

print(cnt)

Submission status: Wrong Answer

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

num_d = 0
for m in range(2,month+1):
    for i in range(2,10):
        if m%i==0:
            d1 = m//i
            if i*10+d1 <= day and d1>1:
                num_d += 1

print(num_d)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m=15
d=40
c=0
for i in range(1,d+1):
    if i>9:
        d1=i%10
        d2=i//10
        for j in range(1,m+1):
            if d1*d2==j and d1>1 and d2>1:
                c+=1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

if M >= 4 and D >= 22:
    ans = 0
    m = 4
    d = 22
    while True:
        if m == M+1:
            break
        while True:
            if d == D+1:
                break
            k = list(str(d))
            if m == int(int(k[0])*int(k[1])):
                ans += 1
            d += 1
        m += 1
        d = 22
    print(ans)

else:
    print(0)

Submission status: Wrong Answer

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

for i in range(4, m + 1):
  for j in range(22, d + 1):
    d12 = list(str(j))
    if int(d12[0]) * int(d12[1]) == i:
      count += 1
      
print(count)

Submission status: Wrong Answer

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,9):
        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: Wrong Answer

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

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

count=0
for i in range(4, M+1):
    for j in range(22, D+1):
        str_j = str(j)
        if (int(str_j[0]) * int(str_j[1])) == i:
            count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


SUM = 0
for m in range(4, int(M)+1) :
    for d in range(22, int(D)+1) :
        if ( int(d % 10) ) * ( int(d / 10) ) == m :
            SUM+=1
        
print(SUM)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin, stdout
def main():
    m,d=stdin.readline().split()
    m=int(m)
    d=int(d)
    c=0
    for i in range(2,m+1):
        for j in range(2,d+1):
            if (j%10)*(j//10)==i:
                c+=1
    stdout.write(str(c//2))


if __name__=="__main__":
    main()

Submission status: Wrong Answer

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

ans = 0;

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

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

I=np.array(input().split(),dtype=np.int32)

M=I[0]
D=I[1]

count=0

def check(d,m):
    d10=int(d[0])
    d1=int(d[1])
    if(m==d10*d1):
        return True
    return False

for m in range(1,M):
    for d in range(22,D+1):
        if(check(str(d),m)):
            count+=1

print(count)

Submission status: Wrong Answer

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

num_d = 0
for m in range(1,month+1):
    for i in range(2,10):
        if i*10 > day:
            continue
        if m%i==0:
            d1 = m//i
            if i*10+d1 <= day and d1>1:
                num_d += 1

print(num_d)

Submission status: Wrong Answer

Solution code:
M,D=map(int,input().split())
if D<21:
        print('0')
else:
        ans=0
        for i in range(22,D):
                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: Wrong Answer

Solution code:
M, D = [int(x) for x in input().split()]
dates = list(range(22,D))
c = 0

for i in range(len(dates)):
  d1 = int(str(dates[i])[-1])
  d2 = int(str(dates[i])[-2])
  if d1*d2 <= M and d1 != 1 and d2 != 1 and d2 != 0 and d1 != 0:
    c += 1
print(c)