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

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

print(ans)

Submission status: Accepted

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

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

else:
    cnt = 0
    for m in range(4, 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:
                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 date in range(1, D+1):
        d1 = date%10
        if d1 < 2: continue
        d10 = int(date/10)
        if d10 < 2: continue
        if d1 * d10 == month:
            count += 1
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
[M,D] = list(map(int,input().split()))
output = 0
for m in range(1,M+1):
    month = str(m)
    for d in range(1,D+1):
        day = str(d)
        [d1,d2] = list(str(day.rjust(2, '0')))
        if (int(d1)>=2)and(int(d2)>=2):
            if int(d1)*int(d2)==int(month):
                output += 1
print(output)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

cal=[[m+1,d+1] for m in range(M) for d in range(D)]

ans=0
for i in cal:
  day=[(i[1]-i[1]%10)/10,i[1]%10]
  if day[0]>1 and day[1]>1:
    if day[0]*day[1]==i[0]:
      ans+=1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for m in range(1, M+1):
    for d in range(20, D+1):
        d1 = d % 10
        d10 = d // 10
        if (d1 < 2):
            continue
        if (d1 * d10 == m):
#            print(str(m)+'/'+str(d))
            cnt = cnt + 1

print(cnt)

Submission status: Accepted

Solution code:
def calendar():
    m, d = map(int, input().split())
    res = []
 
    for month in range(1, m + 1):
        for day in range(2, 10):
            for x in range(2, 10):
                if x * day == month:
                    temp = str(day) + str(x)
                    temp = int(temp)
                    if temp <= d:
                        res.append(temp)
    return len(res)
 
 
print(calendar())

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
l = 0
for i in range(2,10):
    for j in range(2,10):
        k = int(str(i)+str(j))
        if(k<=m and i*j<=n):
            l+=1
print(l)

Submission status: Accepted

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

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

Submission status: Accepted

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

total = 0
for i in range(1,m+1):
    for j in range(10,d+1):
        tmp = list(str(j))
        d1 = int(tmp[0])
        d2 = int(tmp[1])
        if d1 >= 2 and d2 >= 2 and i == d1 * d2:
            total += 1
print(total)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
m, d = map(int, input().split())
ans = 0
for d1 in range(2, 10):
    for d2 in range(2, 10):
        dd = d1 * 10 + d2
        if dd > d or d1 * d2 > m:
            continue
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
m,d = map(int, input().split())
count = 0
for i in range(m):
  i += 1
  for j in range(d):
    j += 1
    j = str(j)
    if len(j) == 2:
      ten = int(j[0])
      one = int(j[1])
      if ten >= 2 and one >= 2 and int(j[0])*int(j[1]) == i:
        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(1, d + 1):
        if (j % 10) * (j // 10) == i and j % 10 >= 2 and j // 10 >= 2:
            cnt += 1
print(cnt)

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 = int(str(d)[1])
        d10 = int(str(d)[0])
        if d1 == 1 or d10 == 1:
            continue
        if m == d1 * d10:
            ans += 1

print(ans)

Submission status: Accepted

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

m  = 0
d10 = 2
d1 = 2

cnt = 0
while True:
    m = d10 * d1 
    d = d10 * 10 + d1
    if m <= M and d <= D:
        cnt += 1

    d1 += 1
    if d1 == 10:
        d1 = 2
        d10 += 1
        if d10 == 10:
            break
print(cnt)

Submission status: Accepted

Solution code:
def check(m,d):
    flg = False
    if d//10>=2 and d%10>=2:
        if (d//10)*(d%10)==m:
            flg = True
    return flg

def main():
    m,d = map(int,input().split())
    ans = 0

    for i in range(1,m+1):
        for j in range(1,d+1):
           
            ans += check(i,j)
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
MM,DD =map(int,input().split())
cnt = 0

for m in range(2,MM+1):
  for d in range(2,DD+1):
    d10 = d//10;d1 = d%10
    if d10*d1 == m and d10>=2 and d1>=2:
      #print(m,d10,d1)
      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(10,d+1):
    if j//10>=2 and j%10>=2 and i==(j//10)*(j%10):
      ans+=1
print(ans)

Submission status: Accepted

Solution code:
def solve(m, d):
	cnt = 0

	for month in range(1, m+1):
		for day in range(22, d+1):
			day1 = day
			d1 = day1%10
			d2 = (day1//10)%10

			if d1 >= 2 and d2 >= 2 and d1*d2 == month:
				cnt += 1

	return cnt


def main():
	m,d = list(map(int, input().strip().split()))

	print (solve(m, d))

if __name__ == "__main__":
	main()

Submission status: Accepted

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

countUp = 0
for mon in range(2, M+1):
    #print("Mon: ", mon)
    for day in range(2, D+1):
        d10 = day // 10
        d1  = day % 10
        if d10 < 2 or d1 < 2:
            continue
        if mon == d10 * d1:
            countUp += 1
            continue

print(countUp)

Submission status: Accepted

Solution code:
def main():
  M, D = map(int, input().split())
  seki = 0
  for month in range(1, M+1):
    for day in range(1, D+1):
      dten = day // 10
      done = day % 10
      seki += 1 if done * dten == month and dten >= 2 and done >= 2 else 0
  print(seki)


if __name__ == '__main__':
  main()

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):
        today = str(d)
        if len(today) > 1 and int(today[0]) > 1 and int(today[1]) > 1 and int(today[0])*int(today[1]) == m:
            ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    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:
                if d1 * d2 == m:
                    # print(m, d)
                    count += 1
    
    print(count)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
M,D = map(int,input().split())
months = range(1,M+1)
days = range(10,D+1)
cnt = 0
for month in months:
  for day in days:
    day = str(day)
    if (int(day[0])>1)&(int(day[1])>1):
      if (int(day[0])*int(day[1]))==month:
        cnt += 1

print(cnt)

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):
        d10 = int(str(d)[0])
        d1 = int(str(d)[1])
        if d10 * d1 == 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(11, d+1):
        d1 = j // 10
        d2 = j % 10
        #print(d1, d2, i)
        if d1 >= 2 and d2 >= 2 and d1*d2 == i:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys
M,D=map(int,input().split())
res=0
if D<=9:
  print('0')
  sys.exit()

d10=int(D/10)
d1=int(D%10)
for i in range(d10-2):
  i2=i+2
  for j in range(10):
    if i2*j<=M and j>=2:
      #print(i2,j)
      res+=1
for i in range(d1+1):
  if i<=1:
    continue
  if d10*i<=M:
    #print(d10,j)
    res+=1
print(res)

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print(sum(j+1==int(i[0])*int(i[1])for i in map(str,range(22,b+1))for j in range(a)if "0" not in i and "1" not in i))

Submission status: Accepted

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

  print(count)

Submission status: Accepted

Solution code:
m,d = list(map(int,input().split()))
num_list = []
s_list = [1 for i in range(10,d+1)]
count = 0

for i in range(10,d+1):
    num_list.append(str(i))
    for j in num_list[i-10]:
        if int(j) >= 2:
            s_list[i-10] *= int(j)
        else:
            s_list[i-10] *= 0

for i in s_list:
    if i <= m and i > 0:
        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):
        d1 = j//10
        d10 = j%10
        if d1*d10==i and d1>=2 and d10 >= 2:
            count += 1
print(count)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

result = 0

def djudge(d, m):
    if d <= 9:
        d1 = d
        d10 = 0
    else:
        strd = str(d)
        d1 = int(strd[1])
        d10 = int(strd[0])
    if d1 * d10 == m and d1>=2 and d10 >=2:
        return True
    else:
        return False

for m in range(1, M+1):
    for d in range(1, D+1):
        if djudge(d, m):
            result += 1
print(result)

Submission status: Accepted

Solution code:
month, date = map(int, input().split())
count = 0
for d in range(22, date+1):
    ones = d % 10;
    tens = d // 10;
    if ones >=2 and tens >= 2 and (ones * tens) <= month:
        count += 1
print(count)

Submission status: Accepted

Solution code:
from sys import stdin

M, D = [int(x) for x in stdin.readline().rstrip().split()]
ans = 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 m == d1 * d10 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(d+1):
    a=i//10
    b=i-a*10
    if a*b!=0  and a!=1 and b!=1:
        for j in range(m+1):
            if a*b==j:
                ans+=1
print(ans)

Submission status: Accepted

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

M_list = list(range(1, M + 1, 1))
D_list = list(range(1, D + 1, 1))

ans = 0

for i in range(M):
    
    for j in range(D):
        
        if D_list[j] <= 21:
            ans += 0
        else:
            d1 = str(D_list[j])[-1]   
            d1 = int(d1)

            d2 = str(D_list[j])[-2]   
            d2 = int(d2)

            if d1 < 2 or d2 < 2:
                ans += 0
            else:
                if d1 * d2 == M_list[i]:
                    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(10, D+1):  # 日付
        d1 = int(str(j)[0])
        d2 = int(str(j)[1])

        if d1 > 1 and d2 > 1:
            if i == (d1 * d2):
                ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque

# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]

from decimal import Decimal

# エントリーポイント
def main():
    M, D = input(int, int)

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

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Submission status: Accepted

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

def main():
    M, D = map(int, input().split())
    count = 0
    for month in range(4,M+1):
        for day in range(20,D+1):
            d10 = int(day / 10)
            d = day - d10 * 10
            if d >= 2 and d * d10 == month:
                count += 1
    print(count)


if __name__ == "__main__":
    main()

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):
    a=int(str(j)[0])
    if j//10==0:
      b=1
    else:
      b=int(str(j)[1])
    if a*b==i and 1<a and 1<b:
      ans+=1
print(ans)

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
ans = 0
d_ten = d // 10
d_one = d - d_ten*10
n = 2
if m<4 or d<22:
  print(0)
else:
  for i in range(2,d_ten):
    for j in range(2,10):
      if i*j<=m:
        ans += 1
  while(n<=d_one):
    if d_ten*n <= m:
      ans += 1
    n += 1
  print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = 0

for d in range(20, D + 1):
    for m in range(1, M+1):
        a, b = map(int, str(d))
        if m == a*b and b >= 2:
            ans += 1


print(ans)

Submission status: Accepted

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

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

ans = 0

for d in range(20, D + 1):
    for m in range(1, M+1):
        a, b = d//10, d % 10
        if m == a*b and b >= 2:
            ans += 1


print(ans)

Submission status: Accepted

Solution code:
m,d = map(int,input().split())
ans = 0
for i in range(22,d+1):
  d0 = i%10
  d1 = int(i/10)
  if d0 == 1 or d0 == 0:
    continue
  if m >= d0 * d1:
    ans += 1
    #print(i)
print(ans)

Submission status: Accepted

Solution code:
m,d=input().split()
a=[]
b=[]
c=0
for i in range(1,int(m)+1):
    a.append(i)
for i in range(10,int(d)+1):
    b.append(str(i))
# print(a)
# print(b)
for i in a:
    for j in range(len(b)):
        if(int(b[j][0])>=2 and int(b[j][1])>=2 and int(b[j][0])*int(b[j][1])==i):
            c+=1
print(c)

Submission status: Accepted

Solution code:
'''
Created on 24-08-2019

@author: martins
'''

def check(m, i):
    a = i % 10
    b = i // 10
    if((a < 2) | (b < 2)):
        return 0
    elif(a*b <= m):
        return 1
    else:
        return 0

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

res = 0
for i in range(22, d+1):
    res += check(m, i)

print(res)

Submission status: Accepted

Solution code:
input_a,input_b = map(int, input().split())
#b1 = input_b % 10
#b10 = int((input_b - b1)/10)
count = 0

if input_a < 4 or input_b < 22:
    print(0)
    #print("case1")
else:
    for i in range(4, input_a+1):
        for j in range(22, input_b + 1):
            j1 = j%10
            j10 = (j-j1)/10
            if j1>=2 and j1*j10 == i:
                #print(i,j)
                count += 1
    print(count)
    #print("case2")

Submission status: Accepted

Solution code:
# jsc2019-qualA - Takahashi Calendar
def main():
    M, D = tuple(map(int, input().split()))
    ans = 0
    for d in range(22, D + 1):
        d1, d10 = d % 10, d // 10
        ans += 1 if d1 >= 2 and d1 * d10 <= M else 0
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
m,d=map(int,input().split());print(sum(i%10*m>m>=i//10*(i%10)for i in range(22,d+1)))

Submission status: Accepted

Solution code:
# jsc2019-qualA - Takahashi Calendar
# exhaustive search
def main():
    M, D = tuple(map(int, input().split()))
    ans = 0
    for m in range(1, M + 1):
        for d in range(1, D + 1):
            if len(str(d)) != 1:
                d1, d10 = int(str(d)[1]), int(str(d)[0])
                if d1 >= 2 and d10 >= 2:
                    ans += 1 if d1 * d10 == m else 0
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for i in range(1, m+1):
    for j in range(20, d+1):
        a = j // 10
        b = j % 10
        if a == 1 or b == 1:
            continue
        if a * b == i:
            ans += 1

print(ans)

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):
    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())
# m,d=12,31

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

Submission status: Accepted

Solution code:
def find(M,D):
    count=0
    for m in range(1,M+1):
        for d in range(1,D+1):
            if len(str(d))==2:
                d0=int(str(d)[0])
                d1=int(str(d)[1])
                if d0>1 and d1>1:
                    if d0*d1==m:
                        count+=1
    return count
M,D=list(map(int,input().strip().split(' ')))
print(find(M,D))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
M, D = map(int, raw_input().strip().split())
ans = 0
for d in xrange(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())
count=0
for i in range(4,m+1):
  for j in range(22,d+1):
    if i==int(str(j)[0])*int(str(j)[1]) and int(str(j)[1])!=0 and int(str(j)[1])!=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(22, d+1):
    j = str(j)
    if i == (int(j[0]) * int(j[1])) and (int(j[1]) >= 2):
      count += 1
print(count)

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):
        if len(str(d)) == 2 and d%10 >=2 and d/10 >= 2 and m == (d%10)*(d/10):
            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):
        j1 = j // 10
        j2 = j % 10
        if j1 >= 2 and j2 >= 2 and j1 * j2 == i:
            ans += 1


print(ans)

Submission status: Accepted

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

ans = 0
for m in range(1,M+1):
  for d in range(11,D+1):
    a,b=list(map(int, list(str(d))))
    if a>1 and b>1 and a*b==m:
      ans += 1      
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

count=0
if D<=10:
  print(0)
else:
  for m in range(1,M+1):
    for d in range(22,D+1):
      a = int(str(d)[-1])
      b = int(str(d)[-2])
      if a>=2:
      	if m==a*b:
        	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):
        d10, d1 = divmod(d, 10)
        if d10 >= 2 and d1 >= 2 and d10 * d1 == m:
            seki += 1
print(seki)

Submission status: Accepted

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[1]) <= 1:
            continue
        if (int(str_j[0]) * int(str_j[1])) == i:
            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):
        d1, d10 = d % 10, d // 10
        if d1 >= 2 and d10 >= 2 and d1*d10 == m:
            ans += 1
print(ans)

Submission status: Accepted

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

M, D = inpl()
ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        d10 = d//10
        d1 = d%10
        ans += m == (d1 * d10) * (d1 > 1) * (d10 > 1)

print(ans)

Submission status: Accepted

Solution code:
def resolve():
    m, d = map(int, input().split())
    if d < 22:
        return 0
    count = 0
    for mi in range(4, m + 1):
        for di in range(22, d + 1):
            d10, d1 = str(di)
            if int(d10) * int(d1) == mi and int(d1) > 1:
                count += 1
    return count


if __name__ == "__main__":
    print(resolve())

Submission status: Accepted

Solution code:
from math import log10
m, d = map(int, input().split())
ans = 0
for month in range(1, m + 1):
    for date in range(1, d + 1):
        str_date = str(date)
        tmp = 1
        for char in str_date:
            if int(char) < 2 or len(str(date)) < 2:
                break
            tmp*= int(char)
        else:
            if tmp == month:

                ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
ans=0
for i in range(1,a+1):
  for j in range(10,b+1):
    k=str(j)
    if int(k[0])<2 or int(k[1])<2:
      continue
    else:
      if int(k[0])*int(k[1])==i:
        ans+=1
        
print(ans)

Submission status: Accepted

Solution code:
day=input().split()
x=int(day[0])
y=int(day[1])

a=1 #月
b=22 #日
c=0
d=0
ans=0

for i in range(x):
	while b<=y :
		c=int(b/10)
		d=b%10
		if a==c*d:
			ans+=1
		b+=1
		if b%10==0:
			b+=2
	a+=1
	b=22
print(ans)

Submission status: Accepted

Solution code:
from functools import reduce
m, d = map(int, input().split())
count = 0
for i in range(4, max((4, m+1))):
  for j in range(22, max((22, d+1))):
    if j < 22:
      continue
    dd = str(j)
    if '1' in dd:
      continue
    if i == reduce(lambda x, y: int(x) * int(y), dd):
      count += 1
print(count)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

M, D = map(int, input().split())
tmp1, tmp2 = 0, 0
ctr = 0

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

Submission status: Accepted

Solution code:
import numpy as np
M,D = map(int,input().split())
a = 0
for i in np.arange(22,D+1):
  d10 = int(i/10)
  d01 = i-d10*10
  if d01 <= 1:
    continue
  if 0 < d10*d01 and d10*d01 <= M:
    a += 1
print(a)

Submission status: Accepted

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

for d in range(10, D + 1):
  d_1 = d % 10
  d_10 = int(d / 10)
  if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 <= M:
    ans += 1

print(ans)

Submission status: Accepted

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

for i in range(m+1):
    for j in range(d+1):
        d1 = j % 10
        d10 = (j - d1) // 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())

ans = 0
for month in range(4, m+1):
  for day in range(22, d+1):
    sday = str(day)
    if int(sday[1]) < 2:
      continue
    if int(sday[0]) * int(sday[1]) == month:
      ans += 1

print(ans)