Problem:


Score : 200 points

Problem Statement

Today is August 24, one of the five Product Days in a year.

A date m-d (m is the month, d is the date) is called a Product Day when d is a two-digit number, and all of the following conditions are satisfied (here d_{10} is the tens digit of the day and d_1 is the ones digit of the day):

d_1 \geq 2

d_{10} \geq 2

d_1 \times d_{10} = m

Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of M month from Month 1 to Month M, and each month consists of D days from Day 1 to Day D.

In Takahashi Calendar, how many Product Days does a year have?

Constraints

All values in input are integers.

1 \leq M \leq 100

1 \leq D \leq 99

Input

Input is given from Standard Input in the following format:

M D

Output

Print the number of Product Days in a year in Takahashi Calender.

Sample Input 1

15 40

Sample Output 1

10

There are 10 Product Days in a year, as follows (m-d denotes Month m, Day d):

4-22

6-23

6-32

8-24

9-33

10-25

12-26

12-34

14-27

15-35

Sample Input 2

12 31

Sample Output 2

5

Sample Input 3

1 1

Sample Output 3

0



Sample input:
15 40


Sample output:
10

Submission status: Accepted

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

count = 0

for i in range(1, m+1):
    for j in range(20, d+1):
        d1 = int(str(j)[1])
        d10 = int(str(j)[0])

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

print(count)

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]


def main():
    m, d = map(int, input().split())
    ans = 0
    for i in range(1, m+1):
        for k in range(1, d+1):
            if k >= 22 and int(str(k)[1]) >= 2:
                if i == int(str(k)[0])*int(str(k)[1]):
                    ans += 1
                    # print(i, k)

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix
 
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！
 
def main():
    ans=0
    a,b=map(int,input().split())
    for j in range(1,a+1):
        for i in range(10,b+1):
            c=str(i)
            if int(c[0])>=2 and int(c[1])>=2:
                if j==int(c[0])*int(c[1]):
                    ans+=1
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

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

c = 0
if d < 20:
	print(0)
	exit()
for i in range(1,m+1,1):
	for k in range(20,d+1,1):
		d1 = k%10
		d2 = k//10
		if d1>=2 and d1*d2 == i:
			c+=1
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

if D < 10:
    print("0")
    sys.exit()

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

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from heapq import heapify, heappop, heappush
from sys import stdin

def main():
    M, D = map(int, input().split())
    ans = 0
    for m in range(1, M+1):
        for d in range(10, D+1):
            d_1 = d % 10
            d_10 = d // 10
            if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == m:
                ans += 1
    print(ans)

input = lambda: stdin.readline().rstrip()
main()

Submission status: Accepted

Solution code:
import copy

def j(n):
    if n:print("Yes")
    else:print("No")
    exit(0)
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
s =0
m,d = ips()
for i in range(1,m+1):
    for k in range(1,d+1):
        if k >= 20 and (k%10) >= 2:
            if (k%10) * (k//10) == i:
                s+=1
print(s)

Submission status: Accepted

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

      count+=1
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


cnt=0
for i in range(1,m+1):
    for j in range(22,d+1):
        dta=str(j)
        d1=int(dta[1])
        d10=int(dta[0])
        if d1>=2 and i==d1*d10:
            cnt=cnt+1

print(cnt)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import sqrt
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)

Submission status: Accepted

Solution code:
a, b = (int(_) for _ in input().split())
res = 0
for i in range(4,a+1):
    for ii in range(10,b+1):
        if (ii % 10) >= 2 and (ii //10) >= 2:
            if i == ((ii % 10) * (ii //10)):
                res += 1

print(res)

Submission status: Accepted

Solution code:
M,D = (int(i) for i in input().split())
ans = 0
for m in range(1,M+1):
    for d in range(1,D+1):
        hoge = [int(s) for s in str(d)]
        if len(hoge) == 1: hoge.insert(0,0)
        do,dt = hoge
        if do >= 2 and dt >= 2 and dt*do == m:
            ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
def input(): return sys.stdin.readline().strip()
def gcd(x, y): return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y): return (x * y) // gcd(x, y)
MOD = 10 **9 + 7

# N = int(input())
# S = input()
M, D = map(int, input().split())
# 横
# L = [int(x) for x in input().split()]
# 縦
# A = [int(input()) for _ in range(N)]
# 多次元
# L = [[int(x) for x in input().split()] for _ in range(N)]

ans = 0

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

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

print(ans)

Submission status: Accepted

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

for i in range(1, m + 1):
    for j in range(22, d + 1):
        d10 = j // 10
        d1 = j % 10

        if d10 < 2 or d1 < 2:
            continue

        cnt += 1 if i == d10 * d1 else 0

print(cnt)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 
import math
import sys
import itertools
import numpy as np

# なんこか入力
m,d = map(int, input().split())
answer = 0
for i in range(1,m+1):
    for j in range(1,d+1):
        if j % 10 < 2:
            continue
        if j // 10 < 2:
            continue
        if (j % 10) * (j // 10) == i:
            answer += 1

print(answer)

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

m,d = na()

a = 2
ans = 0

for a in range(2,10):
    for i in range(2,10):
        if a*10+i > d:
            continue
        if a*i <= 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):
    d_1 = d % 10
    d_10 = d // 10
    if d_1 < 2 or d_10 < 2:
        continue
    m = d_1 * d_10
    if m <= 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 day in range(1, D+1):
        d10 = day // 10
        d1 = day - d10*10
        #print(d1, d10, m)
        if d1 >= 2 and d10 >= 2:
            if d1 * d10 == m:
                ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

    print(cnt)
            


main()

Submission status: Accepted

Solution code:
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    [m, d] = li()
    seki = 0
    for mi in range(1, m + 1):
        for di in range(1, d + 1):
            d10 = di // 10
            d1 = di % 10
            if mi == d1 * d10 and d1 >= 2 and d10 >= 2:
                seki = seki + 1
                # print(mi, di)
    print(seki)

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/snap/bin/pypy3


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

    counter = 0
    for m in range(2, M + 1):
        for dd in range(20, D + 1):
            d1 = dd % 10
            if d1 < 2:
                continue

            d10 = dd // 10
            if d1 * d10 == m:
                counter += 1

    print(counter)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for i in range(1, M+1):
    for j in range(22, D+1):
        d_10 = j // 10
        d_1 = j % 10
        if d_10 < 2 or d_1 < 2:
            continue
        if i == d_10 * d_1:
            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(22, D + 1):
        d10 = d // 10
        d1 = d % 10
        if d10 >= 2 and d1 >= 2 and d1 * d10 == m:
            count += 1

print(count)

Submission status: Accepted

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

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

                ans += 1
print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M, D = [int(x) for x in input().split()]
cnt = 0
for i in range(10, 1+D):
    d1, d10 = [int(s) for s in str(i)]
    if (d1 == 1 or d10 == 1): continue
    cnt += (1 <= d1 * d10 <= M)
print(cnt)

Submission status: Accepted

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

for x in range(2, 10):
    for y in range(2, 10):
        if 1 <= x * y <= m and 10 * x + y <= d:
            c += 1

print(c)

Submission status: Accepted

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

ans = 0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c=0
m, d = [int(i) for i in input().split()]
for i in range(1, m+1):
    for j in range(1, d+1):
        if 10 <= j <= 99:
            if int(str(j)[0]) >= 2 and int(str(j)[1]) >= 2 and int(str(j)[0])*int(str(j)[1])==i:
                c += 1

print(c)

Submission status: Accepted

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

ans = 0
for mi in range(1,m+1):
    for di in range(1,d+1):
        if di<10: continue
        di1 = di%10
        di10 = di//10
        if di1 >=2 and di10>=2 and di1*di10==mi:
            ans += 1
        # print(mi,di10,di1, di, ans)
print(ans)

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

ans =0
for i in range(4,M+1):
    for j in range(22,D+1):
        j_s = str(j)
        if(int(j_s[0])>=2 and int(j_s[1])>=2):

            if((int(j_s[0]) * int(j_s[1])) == i):
                ans +=1

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(cn)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys
import numpy as np
from collections import defaultdict, deque, Counter 
from itertools import accumulate, product, permutations,combinations, combinations_with_replacement
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd

max_value = 1000000000
min_value = -1000000000
sys.setrecursionlimit(max_value)

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

count = 0
for i in range(1,m+1):
    for j in range(10,d+1):
        first_d = int(str(j)[1])
        second_d = int(str(j)[0])
        if i == first_d * second_d and first_d >= 2 and second_d >= 2:
            count += 1

print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
M,D = map(int,input().split())
if D < 20:
	print(0)
	exit()
m = [0 for i in range(M+1)]

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

print(sum(m))

Submission status: Accepted

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

print(counter)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M,D=map(int, raw_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

Submission status: Accepted

Solution code:

import sys
def input():
	return sys.stdin.readline().strip()

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

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

print(num)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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


print(res)

Submission status: Accepted

Solution code:
def getlist():
    return list(map(int, input().split()))

M, D = getlist()

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

print(ans)

Submission status: Accepted

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