TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import itertools
import numpy as np
N = input(N)
digit = len(N)
ans = 0
if int(N) < 357:
    print(ans)
else:
    for i in range(3, len(N)):
        ans += 3**i - 3 * 2**i + 3
    print(ans)
    for v in itertools.product('753', repeat=digit):
        if (len(set(list(v)))==3) & (int(''.join(list(v))) <= int(N)):
            ans +=1
    print(ans)

import itertools
import numpy as np
N = input(N)
digit = len(N)
ans = 0
if int(N) < 357:
    print(ans)
else:
    for i in range(3, len(N)):
        ans += 3**i - 3 * 2**i + 3
    for v in itertools.product('753', repeat=digit):
        if (len(set(list(v)))==3) & (int(''.join(list(v))) <= int(N)):
            ans +=1
    print(ans)

import itertools
import numpy as np
N = input()
digit = len(N)
ans = 0
if int(N) < 357:
    print(ans)
else:
    for i in range(3, len(N)):
        ans += 3**i - 3 * 2**i + 3
    for v in itertools.product('753', repeat=digit):
        if (len(set(list(v)))==3) & (int(''.join(list(v))) <= int(N)):
            ans +=1
    print(ans)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import copy
N = int(input())

keta = len(str(N))

l = ['3', '5', '7']
kotae = set()
kotae.add('0')

for i in range(keta):
    print('i={}'.format(i))
    kari = copy.copy(kotae)
    for m in kari:
        print(m)
        for n in l:
            k = m + n
            if int(k) <= N:
                kotae.add(k)

count = 0
for s in kotae:
    count += 1 if all(s.count(c) > 0 for c in '753') else 0

print(count)

#%%
import copy
N = int(input())

keta = len(str(N))

l = ['3', '5', '7']
kotae = set()
kotae.add('0')

for i in range(keta):
    kari = copy.copy(kotae)
    for m in kari:
        for n in l:
            k = m + n
            if int(k) <= N:
                kotae.add(k)

count = 0
for s in kotae:
    count += 1 if all(s.count(c) > 0 for c in '753') else 0

print(count)


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
limit = input()



def dfs(s):
	if int(s)>limit:
		return 0

	ret = 1 if all(s.count(c)>0 for c in "753") else 0
	for c in "753":
		ret += dfs(s+c)
	return ret
print(dfs("0"))


limit = int(input())



def dfs(s):
	if int(s)>limit:
		return 0

	ret = 1 if all(s.count(c)>0 for c in "753") else 0
	for c in "753":
		ret += dfs(s+c)
	return ret
print(dfs("0"))




Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n=int(input())

a=[0]*n
aa=0
for i in range(n):
    b=set(list(str(i)))
    if len(b)==3:
        if b.count("7")>0 and b.count("5")>0 and b.count("3")>0:
            aa+=1
    a[i]+=aa


print(a[n-1])

from itertools import product
n = int(input())
cnt = 0
for i in range(3,10):
    for m in product(["3","5","7"],repeat = i):
        if "3" in m and "5" in m and "7" in m and int("".join(m))<=n:
            cnt += 1
print(cnt)

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import itertools
N = int(input())
ans = 0
for i in range(1, 10):
  for x in itertools.product("753", repeat=i):
    s= ''.join(x)
    if int(s) > N: continue
    if '3' not in s: continue
    if '5' not in s: continue
    if '7' not in s: continue
    print(s)
    ans += 1
print(ans)

import itertools
N = int(input())
ans = 0
for i in range(1, 10):
  for x in itertools.product("753", repeat=i):
    s= ''.join(x)
    if int(s) > N: continue
    if '3' not in s: continue
    if '5' not in s: continue
    if '7' not in s: continue
    ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())

def dfs(s, res):
  if int(s) > N:
    return
  res = +all((t in s)for t in '753')
  for i in '753':
    res += dfs(s+i, res)
  return res

print(dfs('0', 0))

N = int(input())

def dfs(s, res):
  if int(s) > N:
    return 0
  res = +all((t in s)for t in '753')
  for i in '753':
    res += dfs(s+i, res)
  return res

print(dfs('0', 0))

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
= int(input())
def f(x):
    if int(x) >N:
        return 0
    if x.count('3')>0 and x.count('5')>0 and x.count('7')>0:
        z = 1
    z=0
    z +=f(x+'3')
    z +=f(x+'5')
    z +=f(x+'7')
    return z
print(f('0'))

N= int(input())
def f(x):
    if int(x) >N:
        return 0
    if x.count('3')>0 and x.count('5')>0 and x.count('7')>0:
        z = 1
    z=0
    z +=f(x+'3')
    z +=f(x+'5')
    z +=f(x+'7')
    return z
print(f('0'))


N= int(input())
def f(x):
    z=0
    if int(x) >N:
        return 0
    if x.count('3')>0 and x.count('5')>0 and x.count('7')>0:
        z = 1
    z +=f(x+'3')
    z +=f(x+'5')
    z +=f(x+'7')
    return z
print(f('0'))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = input()
Nlen = len(N)
N = int(N)

def f(i, n, T, F, S):
  if i >= Nlen:
    return 1 if n <= N and T > 0 and F > 0 and S > 0 else 0
  n *= 10
  cnt = 0
  if n == 0:
    cnt += f(i+1, n, T  , F  , S  )
  cnt += f(i+1, n+3, T+1, F  , S  )
  cnt += f(i+1, n+5, T  , F+1, S  )
  cnt += f(i+1, n+7, T  , F  , S+1)

print(f(0, 0, 0, 0, 0))


N = input()
Nlen = len(N)
N = int(N)

def f(i, n, T, F, S):
  if i >= Nlen:
    return 1 if n <= N and T > 0 and F > 0 and S > 0 else 0
  n *= 10
  cnt = 0
  if n == 0:
    cnt += f(i+1, n, T  , F  , S  )
  cnt += f(i+1, n+3, T+1, F  , S  )
  cnt += f(i+1, n+5, T  , F+1, S  )
  cnt += f(i+1, n+7, T  , F  , S+1)
  return cnt

print(f(0, 0, 0, 0, 0))

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import itertools
n=int(input())

keta=len(str(n))
hako=[]
for i in range(3,keta+1):
    for c in list(itertools.product(["7","5","3"],repeat=i)):
        if len(set(c))==3:
            a=int("".join(c))
            hako.append(a)
if n in hako:
    hako.sort()
    k=hako.index(n)
    b=hako[:k]
    print(len(b)) 
else:
    hako.append(n)
    hako.sort()
    k=hako.index(n)
    b=hako[:k]
    print(int(len(b))+1)

import itertools
n=int(input())

keta=len(str(n))
hako=[]
for i in range(3,keta+1):
    for c in list(itertools.product(["7","5","3"],repeat=i)):
        if len(set(c))==3:
            a=int("".join(c))
            hako.append(a)
if n in hako:
    hako.sort()
    k=hako.index(n)
    b=hako[:k]
    print(len(b)+1) 
else:
    hako.append(n)
    hako.sort()
    k=hako.index(n)
    b=hako[:k]
    print(int(len(b)))

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
from collections import defaultdict
p_y = defaultdict(set)

N,M = map(int,input().split())
PY = [[int(x) for x in input().split()] for _ in range(M)]
for p,y in PY:
        p_y[p].add(y)

def set_rank(retu):
        return {x:i for i,x in enumerate(sorted(retu), 1)}

p_y = {p:set_rank(retu) for p,retu in p_y.items()}
for p,y in PY:
        print('{:06g}{:06g}'.format(p,p_y[p][y]))

import sys
sys.setrecursionlimit(10**9)

def stgsn(N, maked_num, now_num):
    if now_num != '':
        if int(now_num) > N:
            return

        maked_num.append(now_num)

    stgsn(N, maked_num, now_num + '7')

    stgsn(N, maked_num, now_num + '5')

    stgsn(N, maked_num, now_num + '3')

    return maked_num


def main():
    N = int(input())


    maked_num = []
    now_num = ''

    maked_num = stgsn(N, maked_num, now_num)

    ans = [s for s in maked_num if '3' in s and '5' in s and '7' in s]
    print(len(ans))


main()

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import itertools
import copy as cp
X = int(input())
X_l = len(str(X))
n = ['3','5','7']
comb = [n]
all_comb = []
all_ans = []
if X < 357:
  print(0)

#print(comb.append('a'))
for i in range(X_l - 3):
  tmp_comb = cp.copy(comb)
  for co in tmp_comb:
    for key in n:
      newco = cp.copy(co)
      newco.append(key)
      comb.append(newco)
for co in comb:
  for c in itertools.permutations(co, len(co)):
    all_comb.append(c)
#print(all_comb)  
for nums in list(set(all_comb)):
  num = int(''.join(nums))
  if num < X:
    print(num)
    all_ans.append(num)
print(len(all_ans))


import itertools as t

N = int(input())

L = [ int(''.join(j)) for i in range(10) for j in t.product(['3','5','7'], repeat=i) if '3' in j and '5' in j and '7' in j]
L = [i for i in L if i <= N]
print(len(L))


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
def dfs(s):
    if int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s+c)
    return ret
print(dfs('0'))

N = int(input())

def dfs(s):
    if int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s+c)
    return ret
print(dfs('0'))

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())

N_str = str(N)
n = len(N_str)
num = 0
for i in range(3,n):
    num += (3**i-3*2**i+3)

def number(x):
    List = []
    X = str(x)
    for i in range(len(X)):
        List.append(int(X[i]))
    a = List.count(3)
    b = List.count(5)
    c = List.count(7)
    if a>=1 and b>=1 and c>=1 and a+b+c==len(X):
        return True
    else:
        return False

if N > 10**7:
    if int(N_str[0]) > 7:
        num += (3**n-3*2**n+3)
        c = N+1
    elif int(N_str[0]) > 5:
        num += (3**n-3*2**n+3)*2//3
        c =6*10**(n-1)+1
    elif int(N_str[0]) > 3:
        num += (3**n-3*2**n+3)//3
        c =4*10**(n-1)+1


while c <= N:
    if number(c):
        num += 1
    c += 2

print(num)

N = int(input())


List = []
n = len(str(N))
ans = 0
if n >= 3:
    if n > 3:
        for i in range(2,n-1):
            ans += (3**(i+1)-3*2**(i+1)+3)
    for j in range(n):
        if j == 0:
            List = [3*10**(n-1),5*10**(n-1),7*10**(n-1)]
        else:
            for k in range(3**j):
                num = List.pop(0)
                List.append(num+3*10**(n-j-1))
                List.append(num+5*10**(n-j-1))
                List.append(num+7*10**(n-j-1))
    for l in range(len(List)):
        if List[l] <= N:
            s = str(List[l])
            if "3" in s and "5" in s and "7" in s:
                ans += 1

print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n1=int(input())
l1=len(str(n1))
count=0
def count1(n):
  l=len(str(n))-1
  l2=int(str(n)[0])
  if int(str(n)[0])>=8:
    return 3*(3**l+3-3*(2**l))
  elif int(str(n)[0])==7:
    return count(n-7*(10**(l-1)))+2*(3**l+3-3*(2**l))
  elif l2==6:
    return 2*(3**l+3-3*(2**l))
  elif l2==5:
    return count(n-5*(10**(l-1)))+(3**l+3-3*(2**l))
  elif l2==4:
    return (3**l+3-3*(2**l))
  elif l2==3:
    return count(n-3*(10**(l-1)))
  else:
    return 0
    
    
if l1<3:
  print(0)
else:
  if l1>=4:
    for i in range(3,l1):
      c+=3**i+3-3*(2**i)
  print(c+count1(n1))
  

from collections import deque
n=int(input())
num=0
l=["3","5","7"]
q=deque(["3","5","7"])
count=0
while q:
  a=q.popleft()
  for i in l:
    if int(i+a)<n:
    count+=1
    q.append(i+a)
print(count)

num=int(input())
def dfs(n):
  if n>num:
    return 0
  else:
    w=str(n)
    if w=="0":
      w=""
    if "3" in w and "7" in w and "5" in w:
      ret=1
    else:
      ret=0
    for i in "357":   
      ret+=dfs(int(i+w))
    return ret
print(dfs(0))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
def dfs(s):
    if int(s)>n:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s+c)
    return ret

print(dfs('0'))


n = int(input())

def dfs(s):
    if int(s)>n:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s+c)
    return ret

print(dfs('0'))


Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())
i = 1
count = 0
if N >= 777777777:
    while i <= N:
        I = str(i)
        I = list(I)
        if I.count("3")>0 and I.count("5")>0 and I.count("7"):
            if I.count("0")==0 and I.count("1")==0 and I.count("2")==0 and I.count("4")==0 and I.count("6")==0 and I.count("8")==0 and I.count("9")==0:
                count+=1
                i+=1
            else:
                i+=1
        else:
            i+=1
    print(count)
else:
    print(26484)

 N = int(input())

 def dfs(s): 
 if int(s) > N:
 return 0
 ret = 1 if all(s.count(c) > 0 for c in '753') else 0 
 for c in '753':
 ret += dfs(s + c)
 return ret

 print(dfs('0'))

N = int(input())
def dfs(s): 
if int(s) > N:
  return 0
  ret = 1 if all(s.count(c) > 0 for c in '753') else 0 
  for c in '753':
    ret += dfs(s + c)
    return ret
print(dfs('0'))

N = int(input())
def dfs(s): 
  if int(s) > N:
    return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0 
    for c in '753':
      ret += dfs(s + c)
      return ret
print(dfs('0'))

N = int(input())
def shichi(n):
    if int(n) > N:
        return 0
    ret=1 if all(n.count(c)>0 for c in "753") else 0
    for c in "753":
        ret += shichi(n+c)
    return ret
print(shichi("0"))

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):


import sys
sys.setrecursionlimit(100000)
N = 999999999


cnt = 0
def dfs(v):
    global cnt
    
    
    num = "753"
    
    for n in num:
        next_v = v + n
        
        
        if int(next_v) >= N: continue
        
        dfs(next_v)
        if "3" in next_v and "5" in next_v and "7" in next_v:
            cnt += 1

dfs("")
print(cnt)

N = int(input())
def dfs(s): 
    if int(s) > N:
        print("invalid  ",s)
        return 0
    print("valid    ",s)
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0 
    for c in '753':
        ret += dfs(s+c) 
    return ret

print(dfs('0')) 

N = int(input())
def dfs(s): 
    if int(s) > N:
        print("invalid  ",s)
        return 0
    print("valid    ",s)
    cnt = 1 if all(s.count(c) > 0 for c in '753') else 0 
    for c in '753':
        cnt += dfs(s+c) 
    return cnt
dfs("0")



import sys
sys.setrecursionlimit(100000)
N = int(input())


cnt = 0
def dfs(v):
    global cnt
    
    
    num = "753"
    
    for n in num:
        next_v = v + n
        
        
        if int(next_v) > N: continue
        
        dfs(next_v)
        if "3" in next_v and "5" in next_v and "7" in next_v:
            cnt += 1

dfs("")
print(cnt)	

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())
ans = 0

def dfs(s):
    if int(s) > N:
        return

    if s.count('7') and s.count('5') and s.count('3'):
        cnt += 1
    
    dfs(s + '7')
    dfs(s + '5')
    dfs(s + '3')

dfs('')

print(ans)

N = int(input())
ans = 0

def dfs(s):
    global ans
    if int(s) > N:
        return

    if all(s.count(c) for c in '753'):
        ans += 1
    
    dfs(s + '7')
    dfs(s + '5')
    dfs(s + '3')

dfs('0')

print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    if all(s.count(c) > 0 for c in '753'):
        ret = 1
    else:
        ret = 0
    for c in '753':
        ret += dfs(s+c)

print(dfs('0'))

N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    if all(s.count(c) > 0 for c in '753'):
        ret = 1
    else:
        ret = 0
    for c in '753':
        ret += dfs(s+c)
	return ret
  
print(dfs('0'))


N = int(input())
def dfs(s):
    if int(s) > N:
        return 0
    if all(s.count(c) > 0 for c in '753'):
        ret = 1
    else:
        ret = 0
    for c in '753':
        ret += dfs(s+c)
    return ret

print(dfs('0'))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())

def dfs(s):
    if int(s) > N:
        return 0
    else:
        ret = 1 if all(s.count(c) > 0 for c in '753') else 0
        for c in '753':
            ret = dfs(s + c)
        return ret

print(dfs('0'))


N = int(input())

def dfs(s):
    if int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret = dfs(s + c)
    return ret

print(dfs('0'))


N = int(input())

def dfs(s):
    if int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0
    for c in '753':
        ret += dfs(s + c)
    return ret

print(dfs('0'))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
s = input()
l = len(s)
n = int(s)
ans = 0
import itertools
for li in range(3, l+1):
    for i in itertools.product([7, 5, 3], repeat=li):
        if len(set(i)) == 3:
            ans += 1
        num = int(''.join(map(str, i)))
        if num > n:
            continue
print(ans)

s = input()
l = len(s)
n = int(s)
ans = 0
import itertools
for li in range(3, l+1):
    for i in itertools.product([7, 5, 3], repeat=li):
        if len(set(i)) != 3:
            continue
        num = int(''.join(map(str, i)))
        if num <= n:
            ans += 1

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n = 10#int(input())
cnt = 0

def rec(pref):
	global cnt
	if pref <= n:
		cnt += 1
		for d in {3, 5, 7}:
			rec(pref * 10 + d)


rec(0)
print(cnt - 1)


cnt = 0
n = int(input())
cnt = 0

def rec(int pref):
	if pref <= n:
		cnt += 1
		for d in {3, 5, 7}:
			rec(pref * 10 + d)


rec(0)
print(cnt - 1)


n = int(input())
cnt = 0

def rec(pref):
	global cnt
	if pref <= n:
		cnt += 1
		for d in {3, 5, 7}:
			rec(pref * 10 + d)


rec(0)
print(cnt - 1)


n = int(input())
cnt = 0

def rec(pref):
	global cnt
	if pref <= n:
		s = str(pref)
		if '3' in s and '5' in s and '7' in s:
			#print(pref)
			cnt += 1
		for d in {3, 5, 7}:
			rec(pref * 10 + d)


rec(0)
print(cnt)


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
from copy import deepcopy


def mk_array(init_val, *args):
    args = args[::-1]
    res = [init_val for _ in range(args[0])]
    for arg in args[1:]:
        res = [deepcopy(res) for _ in range(arg)]
    return res


N = int(input())
e = [0 for _ in range(N + 1)]

for i in range(2, N + 1):
    for j in range(2, i + 1):
        while i % j == 0:
            e[j] += 1
            i //= j

counts = list(filter(lambda x: x > 0, e))
prim_count = len(counts)
counts = [0] + counts  
dp = mk_array(0, prim_count + 1, 75 + 1)
dp[0][1] = 1

for i in range(1, prim_count + 1):
    for j in range(1, 75 + 1):
        for k in range(min(counts[i], 75 // j - 1) + 1):
            dp[i][j * (k + 1)] += dp[i - 1][j]

print(dp[prim_count][75])


def main():
    from collections import deque

    N = int(input())

    dq = deque([0])
    cnt = 0
    while dq:
        x = dq.popleft()
        if all(c in str(x) for c in '357'):
            cnt += 1
        for k in (3, 5, 7):
            nx = x * 10 + k
            if nx <= N:
                dq.append(nx)
    print(cnt)


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import itertools
N= input()
Number=int(N)
count=[]
x=0
n=3
count=0
def check (S):
    S=str(S)
    if S.count('3')!=0 and S.count('5')!=0 and S.count('7')!=0 and int(S)<=Number:
        print(S)
        return 1

def dfs(x):
    global count
    if check(x)==1:
        count+=1
    if x<=Number:
        dfs(10*x+3)
        dfs(10*x+5)
        dfs(10*x+7)


dfs(0)
print(count)


1 N = int(input())
2
3 def dfs(s): 
4 if int(s) > N:
5 return 0
6 ret = 1 if all(s.count(c) > 0 for c in '753') else 0 
7 for c in '753':
8 ret += dfs(s + c)
9 return ret
10
11 print(dfs('0')) 


import itertools
N= input()
Number=int(N)
count=[]
x=0
n=3
count=0
def check (S):
    S=str(S)
    if S.count('3')!=0 and S.count('5')!=0 and S.count('7')!=0 and int(S)<=Number:
        return 1

def dfs(x):
    global count
    if check(x)==1:
        count+=1
    if x<=Number:
        dfs(10*x+3)
        dfs(10*x+5)
        dfs(10*x+7)


dfs(0)
print(count)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n = int(input())
count = 0
for i in range(n):
    str_n = str(n)
    str_n.replace("7", "").replace("5", "").replace("3", "")
    if not str_n:
        count += 1
print(count)

N = int(input())

def dfs(s): 
    if int(s) > N:
        return 0
    ret = 1 if all(s.count(c) > 0 for c in '753') else 0 
    for c in '753':
        ret += dfs(s + c)
    return ret

print(dfs('0'))


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
X=int(input())
def momo(s)
if int(s)>N:
  return 0

nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
    return nagi
print(momo('0'))

X=int(input())
def momo(s)
if int(s)>X:
  return 0
 
nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
    return nagi
print(momo('0'))

X=int(input())
def momo(s):
  if int(s)>X:
    return 0
  nagi=1 if all(s.count(c)>0 for c in '753') else 0
  for c in '753':
    nagi+=momo(s+c)
  return nagi
print(momo('0'))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N=int(input())
ans=0
def dfs(cur,use):
    global ans
    if cur>N: return
    if use==0b111:ans+=1
    dfs(cur*10+7,use | 0b001)
    dfs(cur*10+5,use | 0b010)
    dfs(cur*10+3,use | 0b100)
    return print(cur)

dfs(0,0)
print(ans)
        

N=int(input())
ans=0
def dfs(cur,use):
    global ans
    if cur>N: return
    if use==0b111:ans+=1
    dfs(cur*10+7,use | 0b001)
    dfs(cur*10+5,use | 0b010)
    dfs(cur*10+3,use | 0b100)

dfs(0,0)
print(ans)
        

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n = int(input())
i=1
sum=0
num = []
for i in range(1,1000000000):
  while i>0:
    amari = i % 10
    if(amari != 3 or amari != 5 or amari != 7):
      break
    i = int(i / 10)    
  num.append(i)
j = 0
while num[j] <= n:
  sum += num[j]
  j += 1
print(sum)


n = int(input())
other = ['0', '1', '2', '4', '6', '8', '9']
def dfs(sss):
  if(int(sss) > n):
    return 0
  r = 1 if(sss == all(s.count(c) > 0 for c in '753')) else 0
  for c in '357':
    r += dfs(sss+c)
  return r
print(dfs('0'))

n = int(input())
def dfs(sss):
  if(int(sss) > n):
    return 0
  r = 1 if(all(sss.count(c) > 0 for c in '753')) else 0
  for c in '357':
    r += dfs(sss+c)
  return r
print(dfs('0'))

Verdicts: Time Limit Exceeded

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
import itertools

number_str = '999999999'
number_int = int(number_str)

count = 0


length = len(number_str)



def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def calc_pre(leng_pre):
    global count
    count += pow(3, leng_pre) + 3 -  3 * pow(2, leng_pre)

def calc_all(length):
    global count
    l = ['3', '5', '7']
    pre_data = set()
    for v in itertools.combinations_with_replacement(l, length):
        # print(v)
        if'3' in v and '5' in v and '7' in v:
            for vv in itertools.permutations(list(v), length):
                aaa = int(''.join(list(vv)))
                if aaa < number_int:
                    if aaa not in pre_data:
                        # print(aaa)
                        count += 1
                        pre_data.add(aaa)
                else:
                    break

if length > 3:
    for i in range(3, length):
        calc_pre(i)

calc_all(length)

print(count)

# print(pow(2, 3))


ans = 0

def check(num_str):
    for i in ['7', '5', '3']:
        if i not in num_str:
            return 0
    return 1

def make_data(num, num_str):
    global ans
    if num < int(num_str):
        return
    if check(num_str):
        ans += 1

    make_data(num, num_str + '7')
    make_data(num, num_str + '5')
    make_data(num, num_str + '3')


def main():
    num = int(input())
    make_data(num, '0')

    global ans
    print(ans)


if __name__ == '__main__':
    main()

Verdicts: Time Limit Exceeded

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
def add(a):
	if int(a)>n:
		return 0
	else:
		ans = 0
		a = '' if int(a)==0 else a
		if a.find('3')>-1 and a.find('5')>-1 and a.find('7')>-1:
			ans+=1
		for i in [3,5,7]:
			ans+=add(a+str(i))
		return ans

n = int(input())
print(add(''))


def add(a):
	if int(a)>n:
		return 0
	else:
		ans = 0
		a = '' if int(a)==0 else a
		if a.find('3')>-1 and a.find('5')>-1 and a.find('7')>-1:
			ans+=1
		for i in [3,5,7]:
			ans+=add(a+str(i))
		return ans

n = int(input())
print(add('0'))


Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
Num753 = {7, 5, 3}

def getDigitList(n):
    list = []
    while n>0:
        list.append(n%10)
        n //= 10
    list.reverse()
    if list==[]: list = [0]
    return list

def getDigitSet(n):
    nSet = set([])
    while n>0:
        nSet.add(n%10)
        n //= 10
    if nSet=={}: nSet = {0}
    return nSet


S = input()
num = int(S)
count = 0
for i in range(357, num):
    nSet = set(getDigitSet(i))
#    if len(nSet)!=3: continue
#    is753 = True
#    for d in nSet:
#        if not (d in Num753):
#            is753 = False 
#            break
    if nSet==Num753: 
        print(i,end=', ')
        count += 1
print(count) 


Set753 = {7, 5, 3}
List753 = [7, 5, 3]

N = int(input())

def getDigitList(n):
    list = []
    while n>0:
        list.append(n%10)
        n //= 10
    list.reverse()
    if list==[]: list = [0]
    return list

def gen(n):
    if n>N: return []
    else:
        d = getDigitList(n)
        #print(d) #
        if set(d)==Set753: 
            result = [n]
        else:
            result = []
        for a in List753:  result += gen(n*10+a)
        return result
                
result = gen(0)
#print(result) #
print(len(result)) 

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
from itertools import product

N = int(input())

_357 = {'3', '5', '7'}

ans = 0
for r in range(3, len(str(N)) + 1):
    for numbers in product(('3', '5', '7'), repeat=r):
        if set(numbers) == _357 and int(''.join(numbers)) <= N:
            print(''.join(numbers))
            ans += 1

print(ans)


from itertools import product

N = int(input())

_357 = {'3', '5', '7'}

ans = 0
for r in range(3, len(str(N)) + 1):
    for numbers in product(('3', '5', '7'), repeat=r):
        if set(numbers) == _357 and int(''.join(numbers)) <= N:
            ans += 1

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
from itertools import product

n = input()

if int(n) < 100:
    print(0)

else:
    ans = 0

    for i in range(3,len(n)+1):
        s = list(product("753",repeat=i))
        for combi in s:
            n_s = "".join(combi)
            if int(n_s) > int(n):
                continue
            if ("7" in combi) and ("5" in combi) and ("3" in combi):
                ans += 1
    
	print(ans)


from itertools import product

n = input()

if int(n) < 100:
    print(0)

else:
    ans = 0

    for i in range(3,len(n)+1):
        s = list(product("753",repeat=i))
        for combi in s:
            n_s = "".join(combi)
            if int(n_s) > int(n):
                continue
            if ("7" in combi) and ("5" in combi) and ("3" in combi):
                ans += 1
    
    print(ans)


Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
from itertools import product
n = int(input())

ans = 0

for i in range(3,len(str(n))+1):
    for p in product('753',repeat=i):
        if n >= int(''.join(list(p))) and all(list(p).count(c) > 0 for c in '753': ans += 1

print(ans)

from itertools import product
n = int(input())

ans = 0

for i in range(3,len(str(n))+1):
    for p in product('753',repeat=i):
        if n >= int(''.join(list(p))) and all(list(p).count(c) > 0 for c in '753'): ans += 1

print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n = input()
from itertools import product
from collectins import Counter
sum = 0
for i in range(len(n)-2):
  for j in list(product("753", repeat=i+3)):
    if int(''.join(j)) <= int(n) and len(Counter(j))==3:
      sum+=1
print(sum)

n = input()
from itertools import product
from collectins import Counter
sum = 0
for i in range(len(n)-2):
  for j in product("753", repeat=i+3):
    if int(''.join(j)) <= int(n) and len(Counter(j))==3:
      sum+=1
print(sum)

n = input()
from itertools import product
sum = 0
for i in range(len(n)-2):
  for j in list(product("753", repeat=i+3)):
    if int(''.join(j)) <= int(n) and len(set(j))==3:
      sum+=1
print(sum)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
N = int(input())

def search(keta, num):
  if keta == 0:
    if int(num) <= N:
      return 1
    else:
      return 0
  else:
    return search(keta-1, num + '0') + search(keta-1, num + '3') + search(keta-1, num + '5') + search(keta-1, num + '7')

keta = len(str(N))

ans = search(keta, '')
print(ans)

N = int(input())

def search(keta, num):
  if keta == 0:
    if '0' in str(int(num)):
      return 0
    elif int(num) <= N:
      return 1
    else:
      return 0
  else:
    return search(keta-1, num + '0') + search(keta-1, num + '3') + search(keta-1, num + '5') + search(keta-1, num + '7')

keta = len(str(N))

ans = search(keta, '')
print(ans)


N = int(input())

def search(keta, num):
  if keta == 0:
    if '0' in str(int(num)):
      return 0
    elif '3' in num and '5' in num and '7' in num:
      if int(num) <= N:
        return 1
      else:
        return 0
    else:
      return 0
  else:
    return search(keta-1, num + '0') + search(keta-1, num + '3') + search(keta-1, num + '5') + search(keta-1, num + '7')

keta = len(str(N))

ans = search(keta, '')
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n = int(input())
l = [True]*(10**9+1)
count = 0
stack = [3, 5, 7]
def check(n, k):
  s = str(n)
  if "3" in s and "5" in s and "7" in s:
    return True
  else:
    return False
while len(stack)>0:
  now = stack.pop()
  if l[now]:
    l[now] = False
    if check(now):
      count += 1
    if now < n:
      stack.append(now*10+3)
      stack.append(now*10+5)
      stack.append(now*10+7)
      stack.append(3*10**len(str(now))+now)
      stack.append(5*10**len(str(now))+now)
      stack.append(7*10**len(str(now))+now)
print(count)
      

n = int(input())
count = 0
stack = [0]
def check(n):
  s = str(n)
  if "3" in s and "5" in s and "7" in s:
    return True
  else:
    return False
while len(stack)>0:
  now = stack.pop()
  if check(now) and now <= n:
    count += 1
  if now < n:
    stack.append(now*10+3)
    stack.append(now*10+5)
    stack.append(now*10+7)
print(count)
      


Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the integers between 1 and N (inclusive), how many _Shichi-Go-San numbers_ (literally "Seven-Five-Three numbers") are there?  Here, a Shichi-Go-San number is a positive integer that satisfies the following condition:    * When the number is written in base ten, each of the digits `7`, `5` and `3` appears at least once, and the other digits never appear.

Submission attempts (in order):
n = int(input())
def counter(num1, num2):
	if num2 == "0":
		num21 = "3"
		num22 = "5"
		num23 = "7"
		return counter(num1, num21) + counter(num1, num22) + counter(num1, num23)
	elif int(num2) > num1:
		return 0
	else:
		result = 0
		num21 = "3" + num2
		num22 = "5" + num2
		num23 = "7" + num2
		if "3" in num21 and "5" in num21 and "7" in num21 and int(num21) <= num1:
			result += 1
			print(num21)
		if "3" in num22 and "5" in num22 and "7" in num22 and int(num22) <= num1:
			result += 1
			print(num22)
		if "3" in num23 and "5" in num23 and "7" in num23 and int(num23) <= num1:
			result += 1
			print(num23)
		return counter(num1, num21) + counter(num1, num22) + counter(num1, num23) + result

print(counter(n, "0"))

n = int(input())
def counter(num1, num2):
	if num2 == "0":
		num21 = "3"
		num22 = "5"
		num23 = "7"
		return counter(num1, num21) + counter(num1, num22) + counter(num1, num23)
	elif int(num2) > num1:
		return 0
	else:
		result = 0
		num21 = "3" + num2
		num22 = "5" + num2
		num23 = "7" + num2
		if "3" in num21 and "5" in num21 and "7" in num21 and int(num21) <= num1:
			result += 1
		if "3" in num22 and "5" in num22 and "7" in num22 and int(num22) <= num1:
			result += 1
		if "3" in num23 and "5" in num23 and "7" in num23 and int(num23) <= num1:
			result += 1
		return counter(num1, num21) + counter(num1, num22) + counter(num1, num23) + result

print(counter(n, "0"))

Verdicts: Wrong Answer

Accepted