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:
import sys


def solve():
    M, D = input().split()

    if int(M) < 4 or int(D) < 20:
        print(0)
        sys.exit()

    ans = 0
    d_max = int(D[0])
    for i in range(4, int(M)+1):
        for j in range(2, d_max+1):
            if i % j == 0 and i // j <= 9 and j * 10 + i // j <= int(D):
                ans += 1
    print(ans)


if __name__ == '__main__':
    solve()

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 + 1):
        d1, d10 = int(str(d)[1]), int(str(d)[0])
        if d1 >= 2 and d1 * d10 == m:
            print(m, d)
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

M, D = map(int, input().split())
d10 = D // 10
d1 = D % 10
count = 0
if D >= 22:
    for i in range(4,M+1):
        for j in range(2, d10):
            for k in range(2, 10):
                if i == j * k:
                    count += 1
        for j in range(2, d1):
            if i == j * d10:
                count += 1

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m, d = map(int, input().split())
ans = 0
for i in range(4, m + 1):
    for j in range(22, d + 1):
        arr = str(j)
        if i == int(arr[0]) * int(arr[1]):
            ans += 1
print(ans)

Submission status: Wrong Answer

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

count = 0

if M < 4 or D < 22:
  print(0)
else:
  for i in range(4,M+1):
    for j in range(22,D+1):
      d = list(str(j))
      if i == int(d[0])*int(d[1]):
        count += 1
      
    
  
  print(count)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys


def solve(M: int, D: int):
    ans = 0

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

    print(ans)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    M = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    solve(M, D)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def adjustD(D):
    #print(D % 10)
    while D % 10 < 2:
        D -= 1
        #print(D)
        #print(D % 10)
    return D

M, D = map(int, input().strip().split())
#print(M, D)
total = 0
D = adjustD(D)
#print(D)
for i in range(4, M + 1):
    for j in range(22, D):
        if (j % 10) * (j // 10) == i:
            #print(j, i)
            total += 1
print(total)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if d >= 22:
  for i in range(22, d+1):
    d10 = int(str(i)[0])
    d1 = i % 10
    if d10 * d1 in range(4, m+1):
      count = count + 1

print(count)

Submission status: Wrong Answer

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

if d >= 22:
  for i in range(22, d):
    d10 = int(str(i)[0])
    d1 = i % 10
    if d10 * d1 in range(4, m+1):
      count = count + 1

print(count)

Submission status: Wrong Answer

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

    print(N)

Submission status: Wrong Answer

Solution code:
def seki_day(m, d):
    d10 = d // 10
    d1 = d - d10 * 10

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

M, D = [int(x) for x in input().split()]

count = 0
for m in range(1, M + 1):
    for d in range(22, D + 1):
        count += seki_day(m, d)

print(count)

Submission status: Wrong Answer

Solution code:
M, D = map(int, input().split())
for i in range(M+1):
    for j in range(D+1):
        d10 = int(j /10)
        d1 = int(j % 10)
        if d10 >=2 and d1 >=2 and d10 * d1 ==i:
            print("{}月{}日".format(i, j))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

cnt = 0
if m < 4 or d < 22:
  pass
else:
  for i in range(4, m+1):
    for j in range(22, d+1):
      if (j // 10) * (j % 10) == i:
        cnt += 1
        
        
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
if m < 4 or d < 22:
  pass
else:
  for i in range(4, m+1):
    for j in range(22, d+1):
      if (j // 10) * (j % 10) == i:
        print(i, j)
        cnt += 1
        
        
print(cnt)

Submission status: Wrong Answer

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

cnt = 0
if m < 4 or d < 20:
  pass
else:
  for i in range(4, m+1):
    for j in range(20, d+1):
      if (j // 10) * (j % 10) == i:
        cnt += 1
        
        
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
print('a')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
'''
 Author: fuad Ashraful Mehmet
 University of Asia Pacific
 created :30 Aug 2019 7.33 PM
 Category :   from Atcoder
 Problem:https: 
'''
import math



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



mySet=list()



for i in range(22,d+1):
	res=(i/10)*(i%10)

	if res<=m:
		mySet.append(res)




print(len(mySet))

Submission status: Wrong Answer

Solution code:
m, d = map(int, input().split())
if m < 4 or d < 22:
  print("0")
else:
  res=0
  for i in range(22, d+1):
    d1, d2 = int(i/10), i%10
    res += 1 if 4<=d1*d2<=m else 0
  print(res)

Submission status: Wrong Answer

Solution code:
m, d = map(int, input().split())
if m < 4 or d < 22:
  print("0")
else:
  res=0
  for i in range(22, d+1):
    d1, d2 = int(d/10), d%10
    res += 1 if d1*d2<=m else 0
  print(res)

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

Submission status: Wrong Answer

Solution code:
M,D = map(int,input().split())
cnt = 0
if D > 21 and M > 3:
  for m in range(4,M+1):
    for d in range(22,D+1):
      a,b = divmod(d,10)
      if m == a*b:
        cnt += 1
      
print(cnt)

Submission status: Wrong Answer

Solution code:
M_D = list(map(int,input().split()))
answer=0
for m in range(1,M_D[0]+1):
    for d in range(1,M_D[1]+1):
        d1 = d%10
        d10 = d//10

        if d1*d10==m and d1>=2 and d10>=2:
            print(d1,d10)
            answer+=1
print(answer)

Submission status: Wrong Answer

Solution code:
M,D= map(int, input().split())
S=0
for x in range(4,M+1):
    for y in range(22,D+1):
        d10=y//10
        d1=y%10
        if d1*d10==x:
            S=S+1
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(d):
    if i%10>=2 and i//10>=2:
        cross = (i%10)*(i//10)
        if 1<= cross <= m:
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
S = input().split()
M = int(S[0])
D = int(S[1])
count = 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:
            if d1 * d10 == m:
                count += 1
                print(m, d)

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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 * d10 == m:
                cnt += 1

    print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def calendar():
    m, d = map(int, input().split())
    res = []

    for month in range(1, m + 1):
        for day in range(2, 9):
            for x in range(2, 9):
                if x * day == month:
                    temp = str(day) + str(x)
                    temp = int(temp)
                    if temp <= d:
                        res.append(temp)
    return len(res)


calendar()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
x=0
if d>99:
  d=99
if m>=4 and d>=22:
  o=int(str(d)[1])
  t=int(str(d)[0])
  for j in range(4,m+1):
    for i in range(2,t):
      if j%i==0 and j/i<10:
        x+=1
    if j%t==0 and j/t<=o:
      x+=1
print(x)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
x=0
if m>=4 and d>=22:
  o=int(str(d)[1])
  t=int(str(d)[0])
  for j in range(4,m+1):
    for i in range(2,t):
      if j%i==0 and j/i<10:
        x+=1
    if j%t==0 and j/t<=o:
      x+=1
print(x)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
x=0
if m>=4 and d>=22:
  o=int(str(d)[1])
  t=int(str(d)[0])
  for i in range(2,t):
    if m%i==0 and m/i<10:
      x+=1
  if m%t==0 and m/t<=o:
    x+=1
print(x)

Submission status: Wrong Answer

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

if D <21:
  print("0")

else:
  for i in range(1,M+1):
    for r in range(21,D+1):
      d_tens,d_ones = divmod(r,10)
    
      if d_ones == 0 or d_ones == 1:
        continue
      elif i == d_tens*d_ones:
        ans+=1
      else:
        continue
      
print(ans)

Submission status: Wrong Answer

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

if D <22:
  print("0")

else:
  for i in range(1,M+1):
    for r in range(22,D+1):
      d_tens,d_ones = divmod(r,10)
    
      if d_ones == 0 or d_ones == 1:
        continue
      elif i == d_tens*d_ones:
        ans+=1
      else:
        continue
      
print(ans)

Submission status: Wrong Answer

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

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

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:
        print(str(i)+ ' ' + str(j))
        count+=1

  print(count)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
count=0
for i in range(m):
  for j in range(d):
    d1=int( (j+1) / 10)
    d2=int(j+1)-d1
    if(i+1==d1*d2):
      count+=1
      continue
print(count+1)

Submission status: Wrong Answer

Solution code:
m,d=map(int,input().split())
count=0
for i in range(m):
  for j in range(d):
    d1=int( (j+1) / 10)
    d2=int(j+1)-d1
    if(i+1==d1*d2):
      count+=1
      continue
print(count)

Submission status: Wrong Answer

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


if __name__ == "__main__":
    main()

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
input_a,input_b = map(int, input().split())

count = 0
if input_a < 4 or input_b < 22:
    print(0)
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 * j10 == i:
                count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
input_a,input_b = map(int, input().split())

count = 0
if input_a < 4 or input_b < 22:
    print(0)
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 * j10 == i:
                count += 1
print(count)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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(22,D+1):
        d1=d%10
        d2=(d-d1)/10
        if d1*d2==m:
            count+=1

print(count-1)

Submission status: Wrong Answer

Solution code:
def find(M,D):
    count=0
    for m in range(1,M+1):
        for d in range(1,D):
            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: 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):
        a=j//10; b=j%10
        if a<2 or b<2:
            continue
        if a*b==i:
            ans+=1
print(ans)

Submission status: Wrong Answer

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

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

if m < 4 or d < 20:
    print(0)
    exit()

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
m, d = map(int, input().split())
ans = 0
for i in range(4, m+1):
    for j in range(20, d+1):
        if i == (j//10)*(j%10):
            ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
M,D=(int(x) for x in input().split())
ans=0
for i in range(1,M+1):
    for j in range(1,D+1):
        if j<10:
            ans+=0
        else:
            d10=math.floor(j/10)
            d1=j-d10*10
            if i==d10*d1:
                ans+=1
print(ans)

Submission status: Wrong Answer

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[0]) <= 1:
            continue
        if (int(str_j[0]) * int(str_j[1])) == i:
            count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N, K = [int(x) for x in input().strip().split()]
A = [int(x) for x in input().strip().split()]
T_A = 0
T_A_all = 0
for i,a in enumerate(A):
    T_A += len([1 for x in A[i+1:] if a > x])
    T_A_all += len([1 for x in A if a > x])
a = T_A
z = T_A + T_A_all * (K -1)
print(int((K*(a+z)//2)%((10**9)+7)))

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
m_list = [i for i in range(m+1)]
d_list = [i for i in range(d+1)]
cnt = 0
for i in d_list[22::]:
    i = str(i)
    i_10,i_1 = int(i[0]),int(i[1])
    for j in m_list[4::]:
        if j == i_10*i_1:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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 * tmp2 == i:
            ctr += 1
print(ctr)

Submission status: Wrong Answer

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

m = int(m)
d = int(d)


ans = 0

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

        if d1*d10 == i:
            ans = ans + 1


print(ans)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

m = int(m)
d = int(d)

print(m)
print(d)

ans = 0
if m>1 & d>1 :
    for i in range(4,m+1):
        for j in range(22,d):
            d1 = j % 10
            d10 = int(j / 10)

            if d1*d10 == i:
                ans = ans + 1


print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(M: int, D: int):
    counter = 0
    for i in range(1, M+1):
        for j in range(20, D):
            if D >= 100:
                break
            d1 = int(str(j)[-2])
            d2 = int(str(j)[-1])
            if d1 < 2 or d2 < 2:
                continue

            if d1*d2 == i:
                counter += 1
    print(counter)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    M = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    solve(M, D)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def loop_num(d,m):
  count = 0
  for i in range(1,d):
    d10 = math.floor(i/10)
    d1 = i%10
    num = d1 * d10
    if num <= m and num >= 2:
      if d10 >= 2 and d1 >= 2:
        count+=1
        
  return count

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


ans = loop_num(d,m)
print(ans)

Submission status: Wrong Answer

Solution code:
m,d = map(int,input().split())
m_list = [i for i in range(m+1)]
d_list = [i for i in range(d+1)]
cnt = 0
for i in d_list[22::]:
    i = str(i)
    i_10,i_1 = int(i[0]),int(i[1])
    for j in m_list[4::]:
        if j == i_10*i_1:
            cnt += 1
for i in d_list[22::]:
    i = str(i)
    i_10_x,i_1_x = int(i[1]),int(i[0])
    for j in m_list[4::]:
        if j == i_10_x*i_1_x:
            cnt += 1
print(int(cnt/2))

Submission status: Wrong Answer

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

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

ans = 0

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