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

point = 0

for i in range(1,m+1):
    for j in range(10,d+1):
        s = str(j)
        one = int(s[0])
        two = int(s[1])
        if one >= 2 and two >= 2 and one*two == i:
            point += 1

print(point)

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
#mod = 10**9 + 7
mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
m,d = readInts()
cnt = 0
for i in range(22,d+1):
    for p in range(1, m+1):
        if i // 10 >= 2 and i % 10 >= 2:
            if p == (i//10) * (i % 10):
                cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def is_the_day(m,d):
    return d >= 22 and (d%10) >= 2 and (d//10) >= 2 and (d%10)*(d//10) == m

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

ans = 0

for m in range(1,M+1):
    for d in range(1,D+1):
        ans += int(is_the_day(m,d))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

ans = 0

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

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

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(1, D+1):
        if d <= 9:
            continue
        d = str(d)
        d1 = int(d[0])
        d2 = int(d[1])
        if d1 >= 2 and d2 >= 2 and m == d1*d2:
            #print(m, d1, d2)
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

m, d = na()

cur_m = 1
cur_d = 1
ans = 0
while cur_m // (m + 1) != 1:
    while cur_d // (d + 1) != 1:
        if cur_d % 10 >= 2 and cur_d // 10 >= 2:
            ans += ((cur_d % 10) * (cur_d // 10)) == cur_m
        cur_d += 1
    cur_d = 1
    cur_m += 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):
        d10=j//10
        d1=j%10
        if d1>1 and d10>1 and d10*d1==i:
            ans+=1
print(ans)

Submission status: Accepted

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

#入力
# s = input()[0:-1]
# n = int(input())
m,d = map(int, input().split())
# a = list(map(int,input().split()))
# a = [int(input()) for i in range()]


# ab=[]
# for i in range():
#     a,b = map(int, input().split())
#     ab.append([a,b])


     
def main():
    ans = 0
    for i in range(1,m+1):
        for j in range(20,d+1):
            d10 = j//10
            d1 = j%10
            if d10 ==1 or d1 ==1:
                continue
            if d10*d1 == i:
                ans+=1
    print(ans)
    
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
m,d = readInts()
cnt = 0
for i in range(22,d+1):
    #print(i//10,i%10)
    for p in range(1,m+1):
        #print(p)
        if i//10 >= 2 and i %10 >= 2:
            if p == (i//10) * (i%10):
                #print(p,i)
                cnt += 1
print(cnt)

Submission status: Accepted

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


def is_seki(m, d1, d10):
    if d1 >= 2 and d10 >= 2 and d1 * d10 == m:
        return 1
    else:
        return 0

total = 0
for month in range(1, m+1):
    for day in range(1, d+1):
        day = str(day)
        if len(day) == 2:
            d1 = int(day[0])
            d10 = int(day[1])
        else:
            d1 = 0
            d10 = int(day)
        total += is_seki(month, d1, d10)

print(total)

Submission status: Accepted

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

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

Submission status: Accepted

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

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):
        d10, d1 = divmod(di, 10)
        if d1 >= 2 and d10 >= 2 and mi == d10 * d1:
            ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

def solve():
    M,D = map(int, input().split())
    cnt = 0
    for m in range(1,M+1):
        for d in range(1,D+1):
           if((d%10)*(d//10) == m and d%10 > 1 and d//10 > 1):
               cnt += 1
            #    print(m,d)

    print(cnt) 

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
def judge(m, d):
    if len(d) == 2 and m == int(d[0]) * int(d[1]) and int(d[0]) >= 2 and int(d[1]) >= 2:
        return 1
    else:
        return 0
ans = 0
for m in range(1, M+1):
    for d in range(1, D+1):
        ans += judge(m, str(d))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
for em in range(1, m + 1):
    for ed in range(1, d + 1):
        q, r = divmod(ed, 10)
        if q >= 2 and r >= 2 and q * r == em:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

m,d = mi()

ans=0

for i in range(1,m+1):
    for j in range(1,d+1):
        if j<22:
            continue

        d1 = j%10
        d10 = j//10
        if d1>=2 and d10>=2 and d1*d10 == i:
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
M, D = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
for i in range(1, M+1):
    for j in range(1, D+1):
        d1 = int(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:
import sys

input = sys.stdin.readline


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_10 = d // 10
            d_1 = d % 10
            if d_1 >= 2 and d_10 >= 2 and d_1 * d_10 == m:
                ans += 1

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

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

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    M,D=MI()
    ans=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 m==d1*d2:
                    ans+=1
                    
    print(ans)
                

main()

Submission status: Accepted

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



for i in range(m):
    i += 1
    for j in range(d):
        j += 1
        if j >= 22:
            r = str(j)
            a = int(r[0])
            b = int(r[1])
            if a >= 2 and b >= 2 and 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 d1 in range(2,10):
        if i % d1 == 0:
            d10 = i // d1
            if 2 <= d10 <= 9 and 10 * d10 + d1 <= d:
              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(20,D+1):
        if(d%10 >= 2):
            if(m == (d//10)*(d%10)):c += 1
print(c)

Submission status: Accepted

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

ans = 0
for m in range(1, M+1):
  for d1 in range(2, 10):
    if m % d1 == 0:
      d10 = m // d1
      if 2 <= d10 <= 9 and 10*d10 + d1 <= D:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    m,d=map(int, input().split())
    cnt=0
    for i in range(1,m+1):
        for j in range(22,d+1):
            jstr=str(j)
            j10=int(jstr[0])
            j1=int(jstr[1])
            if j1>=2 and j10>=2 and i==j1*j10:
                cnt+=1
    print(cnt)
resolve()

Submission status: Accepted

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

Submission status: Accepted

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


print(ans)

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

Submission status: Accepted

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

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

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:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


def resolve():
    m, d = map(int, input().split())

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

    print(res)


if __name__ == '__main__':
    resolve()

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):
        x=str(j)
        if int(x[1])>=2:
            if int(x[0])*int(x[1])==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(20, d+1):
        tenth = j // 10
        oneth = j % 10
        if oneth >= 2 and i == tenth * oneth:
            cnt +=1
        else:
            pass
print(cnt)

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

Submission status: Accepted

Solution code:
# 第2回全国統一プログラミング王決定戦予選-A
if False:
    N=int(input())
    if N%2==0: print(N//2-1)
    else: print(N//2)

# 第1回同じ-A
M,D=map(int,input().split())
ans=0
for m in range(1,M+1):
    for d in range(1,D+1):
        if len(str(d))==2:
            x,y=int(str(d)[0]),int(str(d)[1])
            if x>=2 and y>=2 and x*y==m:
                ans+=1
print(ans)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    m,d=map(int,input().split())
    ans=0
    for i in range(1,m+1):
        for j in range(d+1):
            d_10=j//10
            d_1=j%10
            if d_10>=2 and d_1 >=2 and i == d_10*d_1:
                ans+=1
    print(ans)

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Takahashi Calendar
def calc_product(str_day):
	product = 1
	
	for d in str_day:
		if int(d) < 2:
			return 0
		else:
			product *= int(d)
		
	return product


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

for m in range(1, M + 1):
	for d in range(22, D + 1):
		if calc_product(str(d)) == m:
			#print(str(m) + '月' + str(d) + '日')
			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(1, D+1):
        if d <= 21:
            pass
        else:
            d1, d10 = int(list(str(d))[1]), int(list(str(d))[0])
            if m == d1 * d10 and d1 > 1:
                ans += 1
                #print(m, d)
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(1, D+1):
        d1 = d%10
        d2 = (d-d1)//10
        if d1>=2 and d2 >= 2 and d1*d2 == m:
            ans += 1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
ans=0
for i in range(d+1):
  d10=i//10
  d1=i-d10*10
  if d1!=1 and d10!=1 and d10*d1<=m and 1<=d10*d1:
    ans=ans+1
print(ans)

Submission status: Accepted

Solution code:
m,d=map(int,input().split())
ans=0
for month in range(1,m+1):
    for day in range(1,d+1):
        day=str(day)
        if len(day)!=2:
            continue
        if int(day[0])*int(day[1])!=month:
            continue
        if int(day[0])<2 or int(day[1])<2:
            continue
        #print(month,day)
        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 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:
                ans += 1


print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(300000)

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
def d10(n):
    return n//10
def d1(n):
    return n%10
def sekinohi(m, d):
    return d1(d)>=2 and d10(d)>=2 and m==d1(d)*d10(d)

ans = 0
m, d = map(int, input().split())
for i in range(1, m+1):
    for j in range(1, d+1):
        if sekinohi(i, j):
            ans += 1
print(ans)

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

m,d = iim()
ans = 0
for i in range(1,m+1):
    for j in range(1,d+1):
#        print('{}/{}'.format(i,j))
        d10 = j//10
        d1 = j-d10*10
        if d10 > 1 and d1 > 1 and i == d10*d1:
            ans += 1
print(ans)

Submission status: Accepted

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

ans = 0
for m in range(4, M+1):
    for d in range(20, D+1):
        d10 = d//10
        d1 = d%10
        if d10>=2 and d1>=2 and d10*d1==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(22, d + 1):
        s = str(j)
        if int(s[0]) >= 2 and int(s[1]) >= 2 and i == int(s[0]) * int(s[1]):
            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(10, D + 1):
        d1 = int(str(d)[0])
        d2 = int(str(d)[1])
        if m == d1 * d2 and d1 > 1 and d2 > 1:
            ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    import sys
    import bisect
    from itertools import accumulate

    m, d = map(int, input().split())
    if d < 22:
        print(0)
        return

    count = 0
    for i in range(22, d + 1):
        d1 = int(str(i)[1])
        d10 = int(str(i)[0])

        x = d1 * d10
        if 1 <= x <= m and d1 >= 2:
            count += 1
    print(count)


if __name__ == '__main__':
    main()

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(22, d + 1):
        len_1 = int(str(j)[0])
        len_2 = int(str(j)[1])
        if len_1 >= 2 and len_2 >= 2 and len_1 * len_2 == i:
            ans += 1
print(ans)

Submission status: Accepted

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


def isSEKIDay(m, d):
    ds = str(d).zfill(2)
    d1 = int(ds[1])
    d10 = int(ds[0])
    return (d1 >= 2) and (d10 >= 2) and (d1 * d10 == m)


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

print(cnt)

Submission status: Accepted

Solution code:
#template
from collections import Counter
def inputlist(): return [int(i) for i in input().split()]
#template
M,D = inputlist()
count = 0
for m in range(1,M+1):
    for d in range(10,D+1):
        if d//10 < 2 or d%10 < 2:
            continue
        d10 = d//10
        d1 = d%10
        if d1*d10 == m:
            count+=1
print(count)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
M, D = map(int, input().split())
cnt = 0
for m in range(1, M + 1):
    for dd in range(1, D + 1):
        if dd < 10:
            continue
        d1 = dd % 10
        d2 = (dd - d1) // 10
        if d1 > 1 and d2 > 1 and d1 * d2 == m:
            cnt += 1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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:
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 i==d10*d1 and d1>=2:
            cnt+=1
print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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