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

if d >= 10:
  d10 = d//10
  d1 = d%10
else:
  d10 = 0
  d1 = d

ans = 0

if d10 == 0:
  ans = 0
if d10 == 10:
  ans = 0 
else:
  for j in range (2,10):
    for i in range (2,d10):
      for k in range (1,m+1):
        if i * j == k:
          ans = ans+1
    if d10 >= 2:
      if d1 >2:
        for j in range (2,d1+1):
          for k in range (1,m+1):
            if j * d10 == k:
              ans = ans+1
      if d1 == 2:
        for k in range (1,m+1):
          if d1 * d10 == k:
            ans = ans + 1
          
print(ans)

Submission status: Wrong Answer

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

if d >= 10:
  d10 = d//10
  d1 = d%10
else:
  d10 = 0
  d1 = d

ans = 0

if d10 == 0:
  ans = 0
if d10 == 10:
  ans = 0 
else:
  for j in range (2,10):
    for i in range (2,d10):
      for k in range (1,m+1):
        if i * j == k:
          ans = ans+1
    if d10 >= 2:
      if d1 >2:
        for j in range (2,d1):
          for k in range (1,m+1):
            if j * d10 == k:
              ans = ans+1
      if d1 == 2:
        for k in range (1,m+1):
          if d1 * d10 == k:
            ans = ans + 1
          
print(ans)

Submission status: Wrong Answer

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

if d >= 10:
  d10 = d//10
  d1 = d%10
else:
  d10 = 0
  d1 = d

ans = 0

if d10 == 0:
  ans = 0
if d10 == 10:
  ans = 0 
else:
  for j in range (2,10):
    for i in range (2,d10):
      for k in range (1,m+1):
        if i * j == k:
          ans = ans+1
    if d10 >2:
      if d1 >2:
        for j in range (2,d1):
          for k in range (1,m+1):
            if j * d10 == k:
              ans = ans+1
      if d1 == 2:
        for k in range (1,m+1):
          if d1 * d10 == k:
            ans = ans + 1
          
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
m,d=map(int,input().split())
dt=d//10
do=d%10
answer=0
if d<=21:
  print(0)
  sys.exit()
else:
  for i in range(20):
    if dt==i+2:
      if do==0 or do==1:
        break
      elif m/(i+2)<=do:
        if m//(i+2)<1:
          break
        elif m//(i+2)>10:
          answer+=8
          break
        else:
          answer+=m//(i+2)-1
          break
      else:
        answer+=do-1
        break
    else:
      if m//(i+2)<1:
        h=9
      elif m//(i+2)>10:
        answer+=8
      else:
        answer+=m//(i+2)-1
print(answer)

Submission status: Wrong Answer

Solution code:
tmp = input().split()
m = tmp[0]
d = tmp[1]

count = 0
for i in range(1, int(d)+1):
    if len(str(i)) == 2:
        d1 = int(str(i)[0])
        d2 = int(str(i)[1])
        if d1 >= 2 and d2 >= 2:
            tmp = d1 * d2
            # print(tmp)
            if tmp in range(1, int(m)+1):
                print(i)
                count += 1
print(count)

Submission status: Wrong Answer

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

count = 0
for d in range(22, D):
    d10 = int(d / 10)
    d1 = d - d10 * 10
    if (d1 >= 2) and (d10 >= 2) and (M >= d10 * d1):
        count += 1

print(count)

Submission status: Wrong Answer

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

ans=0
if d<10:
    print(0)
else:
    for i in range(10,d+1):
        for j in range(1,m+1):
            if (i%10)*(i//10)==j:
                ans+=1
    print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
input_line = list(input().split())
month = int(input_line[0])
day = input_line[1]
count = 0
for M in range(4, month + 1):
  for d in range(2, min(10, int(sqrt(M))+1)):
    if d == sqrt(M):
      count+=1
    else:
      if M % d == 0:
        if d + M/d*10 <= int(day):
          count += 2
        else:
          count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys
m,d=map(int,input().split())
dt=d//10
do=d%10
answer=0
if d<=21:
  print(answer)
  sys.exit()
else:
  for i in range(20):
    if dt==i+2:
      if do==0 or do==1:
        break
      elif m/(i+2)<=do:
        if m//(i+2)<1:
          break
        elif m//(i+2)>10:
          answer+=8
        else:
          answer+=m//(i+2)-1
          break
      else:
        answer+=do-1
        break
    else:
      if m//(i+2)<1:
        break
      elif m//(i+2)>10:
        answer+=8
      else:
        answer+=m//(i+2)-1
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
m,d=map(int,input().split())
dt=d//10
do=d%10
answer=0
if d<=21:
  print(answer)
  sys.exit()
else:
  for i in range(20):
    if dt==i+2:
      if do==0 or do==1:
        break
      elif m/(i+2)<=do:
        if m//(i+2)<1:
          break
        elif m//(i+2)>10:
          answer+=9
        else:
          answer+=m//(i+2)-1
          break
      else:
        answer+=do-1
        break
    else:
      if m//(i+2)<1:
        break
      elif m//(i+2)>10:
        answer+=9
      else:
        answer+=m//(i+2)-1
print(answer)

Submission status: Wrong Answer

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

if d >= 10:
  d10 = d//10
  d1 = d%10
else:
  d10 = 0
  d1 = d

ans = 0

if d10 == 0:
  ans = 0
if d10 == 10:
  ans = 0
else:
  for j in range (2,10):
    for i in range (2,d10):
      for k in range (1,m+1):
        if i * j == k:
          ans = ans+1
  if d1 > 2:
    for j in range (2,d1):
      for k in range (1,m+1):
        if j * d10 == k:
          ans = ans+1
  if d1 == 2:
    for k in range (1,m+1):
      if d1 * d10 == k:
        ans = ans + 1

          
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
m,d=map(int,input().split())
dt=d//10
do=d%10
answer=0
if d<=21:
  print(answer)
  sys.exit()
else:
  for i in range(20):
    if dt==i+2:
      if do==0 or do==1:
        break
      elif m/(i+2)<=do:
        if m//(i+2)<1:
          break
        else:
          answer+=m//(i+2)-1
          break
      else:
        answer+=do-1
        break
    else:
      if m//(i+2)<1:
        break
      else:
        answer+=m//(i+2)-1
print(answer)

Submission status: Wrong Answer

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

if d >= 10:
  d10 = d//10
  d1 = d%10
else:
  d10 = 0
  d1 = d

ans = 0

if d10 == 0:
  ans = 0
if d10 == 10:
  ans = 0
else:
  for j in range (2,10):
    for i in range (2,d10):
      for k in range (1,m+1):
        if i * j == k:
          ans = ans+1
  for j in range (2,d1):
    for k in range (1,m+1):
      if j * d10 == k:
        ans = ans+1

          
print(ans)

Submission status: Wrong Answer

Solution code:
import logging

logging.basicConfig(level=logging.INFO, format="%(message)s")
#logging.disable(logging.CRITICAL)

def main():
    M, D = map(int, input().split())
    
    counter = 0
    for i in range(10, D):
        d1 = i % 10
        d2 = int(i // 10)
        logging.info(d1)
        logging.info(d2)
        if d1 >= 2 and d2 >= 2 and d1 * d2 <= M:
            counter += 1
            

    
    print(counter)
    
    logging.info("Hello!")

    
    
    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

def divisors(n):
    divs = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divs.append(i)
            if i != n // i:
                divs.append(n//i)

    divs.sort()
    return divs

cnt = 0

for m in range(1, md[0]+1):
    divs = divisors(m)

    for d in divs:
        if d >= 2 and d != m and d*10 + m/d <= md[1]:
            cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M,D=map(int,input().split())
result=0
 
for i in range(2,D//10+1):
  if i<D//10:
    result+=min(M//i,9)-1
  else:
    if D%10>=2:
      result+=min(M//i,D%10)-1
print(result)

Submission status: Wrong Answer

Solution code:
import sys

childs = list(map(int, input().split()))

A=childs[0]
B=childs[1]
res=0
if A<=3 or B<=21:
    print(0)
    sys.exit()
else:
    for n in range(4, A+1):
        for i in range(2, int(n**0.5)+1):
            if n % i == 0:
                if 10*i+n//i <= B and 10*i+n//i >= 22 and n//i >=2 and n//i <= 9 and i<=9:
                    print(10*i+n//i)
                    res+=1
                if i != n // i:
                    if 10*(n//i)+i <= B and  10*(n//i)+i >= 22:
                        print(10*(n//i)+i)
                        res+=1
print(res)

Submission status: Wrong Answer

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


for i in range(M+1):
    for j in range(D):
        if len(str(j)) >= 2:
            aaa=str(j)[-1]
            bbb=str(j)[-2]
            if int(aaa) >= 2 and int(bbb) >= 2 and int(aaa)*int(bbb) == i :
                cnt +=1
        else:
            pass
print(cnt)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
M = x[0]
D = x[1]
result = 0

if M <= 3 or D < 22:
    print(result)
else:
    for i in range(3, M):
        i += 1
        for j in range(21, D):
            j += 1
            D1 = j % 10
            D10 = j // 10
            if i == D1 * D10:
                result += 1
    print(result)

Submission status: Wrong Answer

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


for i in range(M+1):
    for j in range(D):
        if len(str(j)) >= 2:
            aaa=str(j)[-1]
            bbb=str(j)[-2]
            if int(aaa) >= 2 and int(bbb) >= 2 and int(aaa)*int(bbb) == i :
                print(bbb+aaa)
                cnt +=1
        else:
            pass
print(cnt)

Submission status: Wrong Answer

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

for i in range(M+1):
    for j in range(D):
        if len(str(j)) >= 2:
            aaa=str(j)[-1]
            bbb=str(j)[-2]
            if int(aaa) >= 2 and int(bbb) >= 2 and int(aaa)*int(bbb) == i :
                print(bbb+aaa)
                cnt +=1
        else:
            pass

Submission status: Wrong Answer

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

count = 0
if M < 4 or D < 22:
  print(count)
else :
  for m in range(4,M+1):
    for da in range(2,10):
      if da > m:
        break
      db = int(m/da)
      if m == M and da == int(D/10) and db > D%10:
        break
      if db < 2:
        continue
      if da*10+db <= D and da*db == m:
        count += 1

print(count)

Submission status: Wrong Answer

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

count = 0
if M < 4 or D < 22:
  print(count)
else :
  for m in range(4,M+1):
    for da in range(2,10):
      if da > m:
        break
      db = int(m/da)
      if m == M and da == int(D/10) and db > D%10:
        break
      if db < 2:
        continue
      if da*10+db <= D and da*db == m:
        count += 1
        print(m, da ,db)

print(count)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
M = x[0]
D = x[1]
result = 0

if M <= 3 or D < 22:
    print(result)
else:
    if M > 81:
        M = 81
    for i in range(3, M):
        i += 1
        for j in range(21, D):
            j += 1
            D1 = j % 10
            D10 = j // 10
            if i == D1 * D10:
                result += 1
    print(result)

Submission status: Wrong Answer

Solution code:
x = list(map(int, input().split()))
M = x[0]
D = x[1]
result = 0
print(M,D)

if M <= 3 or D < 22:
    print(result)
else:
    if M > 81:
        M = 81
    for i in range(3, M):
        i += 1
        for j in range(21, D):
            j += 1
            D1 = j % 10
            D10 = j // 10
            if i == D1 * D10:
                result += 1
    print(result)

Submission status: Wrong Answer

Solution code:
import sys

childs = list(map(int, input().split()))

A=childs[0]
B=childs[1]
res=0
if A<=3 or B<=21:
    print(0)
    sys.exit()
else:
    for n in range(4, A+1):
        for i in range(2, int(n**0.5)+1):
            if n % i == 0:
                if 10*i+n//i <= B and 10*i+n//i >= 22 and n//i >=2:
                    res+=1
                if i != n // i:
                    if 10*(n//i)+i <= B and  10*(n//i)+i >= 22:
                        res+=1
print(res)

Submission status: Wrong Answer

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

ans=0
for i in range(1,m+1):
    Div=make_divisors(i)
    D=[]
    for k in Div:
        if 1<k<10:
            D.append(k)
    for k in D:
        day=k*10+(i//k)
        if i//k>1 and day<=d:
            ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
M,D = map(int, input().split())
if M < 4 or D < 22:
    print(0)
else:
    result=0
    for m in range(4,M+1):
        for d in range(22,D+1):
            if int(str(d)[0])*int(str(d)[1])==m:
                result += 1
    print(result)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=0
for i in range(1,a+1):
  for j in range(11,b):
    lst = []
    while j > 0:
      lst.append(j%10)
      j //= 10
    lst.reverse()
    if lst[0] >= 2 and lst[1] >= 2:
      if i == lst[0]*lst[1]:
        x+=1
print(x)

Submission status: Wrong Answer

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

def divisors(n):
    divs = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divs.append(i)
            if i != n // i:
                divs.append(n//i)

    divs.sort()
    return divs

cnt = 0

for i in range(1, md[0]+1):
    divs = divisors(i)
    day = []
    for c in divs:
        if c <= i/2 and c >= 2:

            if c*10 + i/c <= md[1]:
                if not (c*10 + i/c in day):
                    cnt += 1
                    day.append(c*10 + i/c)
                
            if i/c != c and (i/c)*10 + c <= md[1]:
                if not ((i/c)*10 + c in day):
                    cnt += 1
                    day.append((i/c)*10 + c)
                
print(cnt)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=0
for i in range(1,a+1):
  for j in range(11,b):
    lst = []
    while j > 0:
      lst.append(j%10)
      j //= 10
    lst.reverse()
    if lst[0] >= 2 and lst[1] >= 2:
      if i == lst[0]*lst[1]:
        x+=1
print(x)

Submission status: Wrong Answer

Solution code:
M,D = map(int, input().split())
if M < 4 or D < 22:
    print(0);exit()
result=0
for m in range(4,M+1):
    for d in range(22,D+1):
        if int(str(d)[0])*int(str(d)[1])==m:
            result += 1
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M,D = map(int,input().split(' '))
if M <= 3 or D <= 21:
  print(0)
  exit()
num = 0
for m in range(4,M+1):
  for d in range(21,D+1):
    X = str(d)
    if int(X[0]) * int(X[1]) == m:
      num += 1
print(num)

Submission status: Wrong Answer

Solution code:
a,b=map(int,input().split())
x=0
for i in range(1,a+1):
  for j in range(11,b):
    lst = []
    while j > 0:
      lst.append(j%10)
      j //= 10
    lst.reverse()
    if lst[0] >= 2 and lst[1] >= 2:
      if i == lst[0]*lst[1]:
        print(lst[0],lst[1])
        x+=1
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M,D=map(int,input().split())
W=M+1
if D<=21:
  print(0)
if 29>=D>=22:
  d1=D%10
  d10=D//10
  q=[x*y for x in range(2,d1+1) for y in range(2,d10+1)]
  print([q.count(i) for i in range(1,M+1)])
if 30<=D:
    d1=D%10
    d10=D//10
    qq=[x*y for x in range(2,d10) for y in range(2,10)]
    qqq=[d10*w for w in range(2,d1+1)]
    Q=[qq.count(j)for j in range(1,M+1)]+[qqq.count(j)for j in range(1,M+1)]
    DD=sum(Q)
    print(DD)

Submission status: Wrong Answer

Solution code:
M, D = map(int, input().split())
my_list = []
for i in range(1, D + 1): 
    new = []
    number = list(str(i))
    for t in range(0, len(number)):
        new.append(int(number[t]))
    if len(new) == 1:
        continue
    else:
        if new[0] >= 2 and new[1] >= 2:
            for k in range(1, M + 1): 
                if k == (new[0] * new[1]):
                    my_list.append(k)
                    my_list.append(i)
                else:
                    continue
        else:
            continue
print(len(my_list) / 2)

Submission status: Wrong Answer

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

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
month_list = range(0, m+1, 1)
days_list = range(0, d+1, 1)
seki_list =[]
for m in month_list:
    for d in days_list:
        if d >=20 :
            day_list = digit(d)
            print(day_list)
            print(int(day_list[0]))
            print(int(day_list[1]))
            if int(day_list[0]) >= 2 and int(day_list[1]) >= 2:
                print("hoge1")
                if (int(day_list[0])* int(day_list[1])) == m:
                    print("hoge2")
                    seki_list.append("hoge")

print(len(seki_list))

Submission status: Wrong Answer

Solution code:
import sys

childs = list(map(int, input().split()))

A=childs[0]
B=childs[1]
res=0
if A<=3 or B<=21:
    print(0)
    sys.exit()
else:
    for n in range(4, A+1):
        for i in range(2, int(n**0.5)+1):
            if n % i == 0:
                if 10*i+n//i <= B and 10*i+n//i >= 22 and 10*i+n//i <= 99:
                    res+=1
                if i != n // i:
                    if 10*(n//i)+i <= B and  10*(n//i)+i >= 22 and 10*(n//i)+i <= 99:
                        res+=1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

childs = list(map(int, input().split()))

A=childs[0]
B=childs[1]
res=0
if A<=3 or B<=21:
    print(0)
    sys.exit()
else:
    for n in range(4, A+1):
        for i in range(2, int(n**0.5)+1):
            if n % i == 0:
                if 10*i+n//i <= B and 10*i+n//i >= 22 and 10*i+n//i <= 99:
                    res+=1
                if i != n // i:
                    if 10*(n//i)+i <= B and  10*(n//i)+i >= 22 and 10*(n//i)+i >= 99:
                        res+=1
print(res)

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(21, d+1):
        d10 = int(str(n)[0])
        d1 = int(str(n)[1])
        if d10 * d1 == i:
            ans +=1
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
M, D  = map(int, input().split())
cnt = 0
for i in range(D):
    str = "{:02d}".format(i)
    # print(str)
    d1 = str[0]
    d2 = str[1]
    if 1 <= int(d1)*int(d2) <= M and int(d1)>=2 and int(d2)>=2:
        cnt += 1
        # print(str)
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
for i in range(d):
    do = i % 10
    dt = i // 10
    if do <= 1 or dt <= 1:
        continue
    if do*dt <= m:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys

childs = list(map(int, input().split()))

A=childs[0]
B=childs[1]
res=0
if A<=3 or B<=21:
    print(0)
    sys.exit()
else:
    for n in range(4, A+1):
        for i in range(2, int(n**0.5)+1):
            if n % i == 0:
                if 10*i+n//i <= B and 10*i+n//i >= 22:
                    res+=1
                if i != n // i:
                    if 10*(n//i)+i <= B and  10*(n//i)+i >= 22:
                        res+=1
print(res)

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
if d<21:
    print(0)

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

Submission status: Wrong Answer

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

count = 0
if M < 4 or D < 22:
  print(count)
else :
  for m in range(2,M+1):
    for da in range(2,10):
      db = int(m/da)
      if db < 2:
        continue
      if da*10+db <= D and da*db == m:
        count += 1

print(count)

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):
        d10 = int(str(n)[0])
        d1 = int(str(n)[1])
        if d10 * d1 == i:
            ans +=1
print(ans)

Submission status: Wrong Answer

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

A=childs[0]
B=childs[1]
res=0
if A<=3 or B<=21:
    print(0)
else:
    for n in range(4, A+1):
        for i in range(2, int(n**0.5)+1):
            if n % i == 0:
                if 10*i+n//i <= B and 10*i+n//i >= 22:
                    res+=1
                if i != n // i:
                    if 10*(n//i)+i <= B and  10*(n//i)+i >= 22:
                        res+=1
print(res)

Submission status: Wrong Answer

Solution code:
N=input().split()

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


d1=D // 10
d2=D % 10

count=0

for m in range(M+1):
    for i in range(d1+1):
        if d1 == i:
            for j in range(d2+1):
                if  m ==  i * j and m>0 and j>1:
                    count=count+1
        elif i>1:
            for j in range(11):
                if m == i*j and m>0 and j>1:
                    count=count+1
 
print(count)

Submission status: Wrong Answer

Solution code:
import sys
m,d=map(int,input().split())
dt=d//10
do=d%10
answer=0
if d<=21:
  print(answer)
  sys.exit()
else:
  for i in range(20):
    if dt==i+2:
      if do==0 or do==1:
        break
      elif m/(i+2)<=do:
        answer+=m//(i+2)-1
        break
      else:
        answer+=do-1
        break
    else:
      answer+=m//(i+2)-1
print(answer)

Submission status: Wrong Answer

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

M, D = map(int, input().split())
count = 0
di = len(str(M))

for i in range(4, M+1):
    for j in range(1, D+1):
        d_1 = int(str(j).zfill(di)[-1])
        if di > 1:
            d_10 = int(str(j).zfill(di)[-2])
            if d_10 * d_1 >= 4 and d_10 * d_1 == i:
                count += 1

print(count)

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
D=["",""]
if d<21:
    print(0)

cnt=0
for i in range(1,m+1):
    for j in range(22,d+1):
        d10,d1=divmod(j, 10)
        if d1>=2 and i==d1*d10:
            cnt = 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 0<= i <= 3:
        pass
    else:
        for j in range(d+1):
            l = list(str(j))
            n = 1
            for k in l:
                n = n*int(k)
            if n == i :
                count += 1
print(count)

Submission status: Wrong Answer

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

M, D = map(int, input().split())
count = 0
di = len(str(M))

for i in range(1, M+1):
    for j in range(1, D+1):
        d_1 = int(str(j).zfill(di)[-1])
        if di > 1:
            d_10 = int(str(j).zfill(di)[-2])
            if d_10 >= 2 and d_1 >= 2 and d_10 * d_1 == i:
                count += 1

print(count)

Submission status: Wrong Answer

Solution code:
N=input().split()

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


d1=D // 10
d2=D % 10

count=0

for m in range(M+1):
    for i in range(d1+1):
        if d1 == i and i >1:
            for j in range(d2):
                if  m ==  i * j and m>0 and j>1:
                    count=count+1
        elif i>1:
            for j in range(11):
                if m == i*j and m>0 and j>1:
                    count=count+1
 
print(count)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
ans=0
for i in range(22,d):
    s=list(str(i))
    d1=int(s[0])
    d2=int(s[1])
    if d1<2 or d2 <2:
        continue

    for j in range(1,m+1):
        if d1*d2==j:
            ans+=1
            #print(j,i)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

a = []
a = input().split()

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

count = 0

for i in range(M) :
	f = 22
	for j in range(D - 21) :
		if (f // 10)*(f % 10) == i - 1 :
			count = count + 1
			if (f // 10) == 1 or (f % 10) ==1 :
				count = count - 1
		f = f + 1

#print('M = ', M)
#print('D = ', D)
#print('count = ', count)

print(count)

Submission status: Wrong Answer

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

count = 0
for i in range(1, m + 1):
  for j in range(19, d + 1):
    if (j // 10) * (j % 10) == i:
      count += 1
      
print(count)

Submission status: Wrong Answer

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

count = 0
for i in range(1, m + 1):
  for j in range(11, d + 1):
    if (j // 10) * (j % 10) == i:
      count += 1
      
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
M, D = map(int, input().split())
count = 0
for m in range(1, M+1):
    for i in range(2, 9):
        for j in range(2, 9):
            if (i*10 + j) > D:
                break
            if (i * j) == m:
                count += 1
        
print(count)

Submission status: Wrong Answer

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

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

for i in range(1, M+1):
    for j in range(1, D+1):
        d_1 = int(str(j).zfill(len(str(M)))[-1])
        if len(str(M)) > 1:
            d_10 = int(str(j).zfill(len(str(M)))[-2])
            if d_10 >= 2 and d_1 >= 2 and d_10 * d_1 == i:
                count += 1

print(count)

Submission status: Wrong Answer

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

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

count = 0

for i in range(22, D):
  first_1 = i % 10
  second_1 = i // 10
  if first_1 < 2:
    continue
  if first_1 * second_1 <= M:
    count += 1
print(count)

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
    j=D1
    if i*j<=M:
        ans+=1
    print(ans)

Submission status: Wrong Answer

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

count = 0

for i in range(22, D):
  first_1 = i % 10
  second_1 = i // 10
  if first_1 < 2:
    continue
  if first_1 * second_1 <= M:
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys
m,d=map(int,input().split())
dt=d//10
do=d%10
answer=0
if d<=21:
  print(answer)
  sys.exit()
else:
  for i in range(dt-2):
    if dt==i+2:
      if do==0 or do==1:
        break
      elif m/(i+2)>=do:
        answer+=m//(i+2)-1
      else:
        answer+=do-1
    else:
      answer+=m//(i+2)-1
print(answer)

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
if len(str(d)) == 2:
	d1,d2 = str(d)[0],str(d)[1]

cnt = 0
m_list = [i+1 for i in range(m)]
if len(str(d)) == 2:
  for i in range(d):
    if i >= 20:
      d1,d2 = str(i)[0],str(i)[1]
      if d1=='1' or d2=='1':
        continue
      if int(d1)*int(d2) in m_list:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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

M, D = map(str, input().split())
count = 0

for i in range(1, int(M)+1):
    for j in range(1, int(D)+1):
        d_1 = int(str(j).zfill(len(M))[-1])
        if len(M) > 1:
            d_10 = int(str(j).zfill(len(M))[-2])
            if d_10 >= 2 and d_1 >= 2 and d_10 * d_1 == i:
                count += 1

print(count)

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 and dd[0] !=0 and dd[1]!=0:
            if dd[0] *dd[1] == i+1 :
                count +=1

print(count)

Submission status: Wrong Answer

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

for i in range(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:
N, D = map(int, input().split())
day = 0
day10 = 0
ans =0
for j in range(4, N+1):
    for i in range(22, D+1):
        day = i % 10
        day10 = i//10
        
        if j == day * day10:
            ans += 1
            
print(ans)