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:
months, d = map(int, input().split())
 
ans_count = 0
 
for month in range(4, months + 1):
    for i in range(1, d + 1):
        if i <= 9:
            continue
 
        a, b = map(int, str(i))
 
        if a <= 1 and b <= 1:
            continue
 
        if a * b == month:
            ans_count += 1
 
print(ans_count)

Submission status: Wrong Answer

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

ans_count = 0

for month in range(4, months + 1):
    for i in range(1, d + 1):
        if i <= 9:
            continue

        a, b = map(int, str(i))

        if (a or b) <= 1:
            continue

        if a * b == month:
            ans_count += 1

print(ans_count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    for d in range(22, D + 1):
        d1 = d % 10
        d10 = d // 10
        if 4 <= d10 * d1 <= M:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
M,D = map(int,input().split())
ans = 0
for i in range(1,M+1):
    for j in range(2,1+D//10):
        for k in range(2,9):
            if j*10+k > D:
                break
            if i == j*k:
                ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

    print(cnt)


resolve()

Submission status: Wrong Answer

Solution code:
import math

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

    cnt=0
    for m in range(M):
        for d in range(D):
            if(d<22):
                continue
            if(d%10 * d//10 == m):
                cnt+=1

    print(cnt)


resolve()

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+1):
    if(D<22):
      continue
    if(D%10 * D//10 == M):
      cnt+=1

print(cnt)

Submission status: Wrong Answer

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

cnt=0
for i in range(M):
  for j in range(D):
    if(D<22):
      continue
    if(D%10 * D//10 == M):
      cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    m, d = map(int, readline().rstrip().split())
    if d < 10:
        print(0)

    cnt = 0
    for k in range(1, m + 1):
        for i in range(10, d + 1):
            d1, d10 = int(str(i)[1]), int(str(i)[0])
            if d1 * d10 == k and d1 > 1 and d10 > 1:
                cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
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


inf = 10 ** 18
mod = 10 ** 9 + 7

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

Submission status: Wrong Answer

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
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


inf = 10 ** 18
mod = 10 ** 9 + 7

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

Submission status: Wrong Answer

Solution code:
M, D = [int(_) for _ in input().split()]
ans = 0
for m in range(1, M+1):
  for d in range(1, D+1):
    dd = (d%10) * (d - d%10)//10
    if dd == m: ans += 1
print(ans)

Submission status: Wrong Answer

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

ans=0
for mon in range(1,m+1):
    for day in range(1,d+1):
        if day<22:
            continue
        d1,d2=str(day)
        if int(d1)*int(d2)==mon:
            ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
d = input().split()
ans = []
cnt = 0
for day in range(int(d[1])):
    if (day >= 22):
        if (int(str(day)[0]) >=2 and int(str(day)[1]) >=2 ):
            ans.append(int(str(day)[0]) * int(str(day)[1]))
for date in range(2, int(d[0])+1):
    cnt = cnt + ans.count(date)
print(cnt)

Submission status: Wrong Answer

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

d1 = str(D)[0]
if D >9:
  d2 = str(D)[1]

ans = 0

for i in range(1,M+1):
  for j in range(2,9):
    for k in range(2,9):
      if k*j <= (M+1) and i == k*j and 10*j + k <= D:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

d1 = str(D)[0]
if D >9:
  d2 = str(D)[1]

ans = 0

for i in range(1,M+1):
  for j in range(2,9):
    for k in range(2,9):
      if k*j <= M and i == k*j and 10*j + k <= D:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

d1 = str(D)[0]
if D >9:
  d2 = str(D)[1]

ans = 0

for i in range(1,M+1):
  for j in range(2,1 + int(d1)):
    for k in range(2,9):
      if k*j <= M and i == k*j and 10*j+k <=D:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
m,d = list(map(int, input().split())) 
cnt = 0
for  j in range(1,m+1):
    for i in range(1, d+1, 1):
        d1 = i % 10
        d2 = int(i / 10)
        if((d1 >= 2) & (d2 >= 2) & (d1 * d2 == j) ):
            cnt+=1
            print(str(j)+'月'+str(i)+'日')

Submission status: Wrong Answer

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

if D<20:
  print(0)
else :
  count = 0
  for i in range(1,M+1):
    for id in list(range(20, D+1)):
      if int((str(id))[1]) >= 2 and ( int(str(id)[0]))*int((str(id))[1]) == i :
         print(i, id)
         count += 1
  print(count)

Submission status: Wrong Answer

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

if D<10:
  print(0)
else :
  count = 0
  for i in range(1,M+1):
    for id in list(range(10, D+1)):
      if ( int(str(id)[0]))*int((str(id))[1]) == i :
         count += 1
  print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
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)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
M,D = IL()
ans =0
def kake(n):
  return (n%10)*(n//10)
for i in range(1,M+1):
  for d in range(1,D+1):
    if M==kake(d):
      ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

cnt = 0
for i in range(4,m+1):
    a = make_divisors(i)
    if len(a) % 2 != 0:
        if int(str(round(i**0.5))*2) <= d: cnt += 1
        a.pop(a.index(round(i**0.5)))
    elif len(a) >1:
        for i in range(0,len(a)-1,2):
            if int(str(a[i])+str(a[i+1])) <=d: cnt += 1
            if int(str(a[i+1])+str(a[i])) <=d: cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

cnt = 0
for i in range(4,m+1):
    a = make_divisors(i)
    if len(a) == 1:
        if int(str(a[0])*2) <= d: cnt += 1
    elif len(a) >1:
        for i in range(0,len(a)-1,2):
            if int(str(a[i])+str(a[i+1])) <=d: cnt += 1
            if int(str(a[i+1])+str(a[i])) <=d: cnt += 1
print(cnt)

Submission status: Wrong Answer

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(i,j)
print(res)

Submission status: Wrong Answer

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]) == m:
      res += 1
print(res)

Submission status: Wrong Answer

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:
                res += 1

    print(res)


if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

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

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

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
ans=0
for i in range(21,d):
  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: Wrong Answer

Solution code:
m,d=map(int,input().split())
ans=0
for i in range(d):
  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: Wrong Answer

Solution code:
m,d=map(int,input().split())
ans=0
for i in range(d):
  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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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]):
      count = count + 1
print(count)

Submission status: Wrong Answer

Solution code:
def divisor(n):
    tank = []
    for i in range(1, int(n**0.5)+1):
        if n%i==0:
            tank.append((i, n//i))
    return tank

m,d = map(int,input().split())
cnt = 0
for i in range(m):
    k = divisor(i)
    for x,y in k:
        if x>=2 and y<=d:
            cnt += 1
print(cnt)

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(d+1):
        if j < 22 or j%10<2:
            continue
        else:
            a = str(j)
            if int(a[0])*int(a[1])==i:
                count += 1
                print(i,j)
print(count)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
ans=0
if len(str(d))==1:
    print(0)
    exit()

for M in range(2,m+1):
    for D2 in range(2, int(str(d)[0]) + 1):
        for D1 in range(2,9):
            if int(str(D2)+str(D1))<=d:
                if M==D1*D2:
                    ans+=1

            print(D1,D2)

print(ans)

Submission status: Wrong Answer

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

for M in range(2,m+1):

    for D1 in range(2,9):
        for D2 in range(2,int(str(d)[0])+1):
            if int(str(D2)+str(D1))<=d:
                if M==D1*D2:
                    ans+=1

print(ans)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
month = [i for i in range(1,m+1)]
ct=0
if d<10:
  print(0)
  exit()
for i in range(11,d+1):
  a=int(str(i)[0])
  b=int(str(i)[1])
  if a*b in month:
    ct+=1
print(ct)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
x=int(d//10)
a,b,c=list(range(1,10)),list(range(1,x+1)),list(range(1,m+1))
d=sum([i*b for i in a],[])
e=len(set(c)&set(d))
print(e)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
l = []

for i in range(b):
    if i >= 22 and i%10>=2:
        l.append((i//10)*(i%10))
l.sort()
ans = 0
for i in l:
    if a >= i: ans+=1
print(ans)

Submission status: Wrong Answer

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

if d < 22 or m < 4:
    print(0)
    sys.exit()

ans = 0
for i in range(4, m+1):
    for j in range(22, d+1):
        d_0 = j % 10
        d_10 = j // 10
        if d_0 * d_10 == i:
            ans += 1

print(ans)

Submission status: Wrong Answer

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

if d < 22 or m < 4:
    print(0)
    sys.exit()

ans = 0
for i in range(4, m+1):
    for j in range(22, d):
        d_0 = j % 10
        d_10 = j // 10
        if d_0 * d_10 == i:
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
A = list(range(a+1))
count = 0
if b < 10:
  print(0)
else:
  for i in range(2,b+1):
    q = i % 10
    p = i // 10
    if q*p in A and p >= 2 and q >= 2:
      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 d in range(1, D):
        d1 = d % 10
        d2 = (d//10) % 10
        if d1 >= 2 and d2 >= 2 and d1*d2 == m:
            count += 1
print(count)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
ans = 0
for i in range(m):
  for j in range(10,d):
    if "1" or "0" in list(str(j)):
      continue
    j1 = j//10
    j2 = j%10
    if i == j1*j2:
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
ans = 0
for i in range(m):
  for j in range(d):
    if "1" in str(j):
      continue
    j1 = j//10
    j2 = j%10
    if i == j1*j2:
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:

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


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

print(count)

Submission status: Wrong Answer

Solution code:

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


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

print(count)

Submission status: Wrong Answer

Solution code:

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


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

print(count)

Submission status: Wrong Answer

Solution code:
import sys

read = sys.stdin.read
M, D = map(int, read().split())

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

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

print(answer)

Submission status: Wrong Answer

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

for i in range(10, d):
  i1 = i % 10
  i10 = i // 10

  if i1 >= 2 and i10 >= 2 and i1*i10 <= m:
    ans += 1

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n,m=input().split()
ans=0
for i in range(1,int(n)+1):
  for j in range(2,int(m[0])+1):
    for k in range(2,int(m[1])+1):
      if i==j*k:
        ans+=1
print(ans)

Submission status: Wrong Answer

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

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