TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
import sys
from collections import deque
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
pr = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
arr = [0] * 5
num = 1
for i in range(1, n+1):
    num *= i
for n in pr:
    tmp = num
    ct = 0
    while True:
        if tmp % n == 0:
            ct += 1
            tmp //= n
        else:
            break
    if ct >= 74:
        arr[0] += 1
    if ct >= 24:
        arr[1] += 1
    elif ct >= 14:
        arr[2] += 1
    elif ct >= 4:
        arr[3] += 1
    elif ct >= 2:
        arr[4] += 1
print(*arr)
ans = 0
if arr[0] == 1:
    ans += 1
if sum(arr[0:2]) >= 1:
    ans += ((sum(arr[0:2]) * (sum(arr) - 1)))
if sum(arr[0:3]) >= 1:
    ans += ((sum(arr[0:3]) * (sum(arr[0:4]) - 1)))
if sum(arr[0:4]) >= 2 and arr[4] >= 1:
    s = sum(arr[0:4])
    ans += (s * (s-1) * (s-2) // 2)
    ans += (arr[4] * s * (s-1) // 2)
print(ans)

import sys
from collections import deque
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
pr = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47]
arr = [0] * 5
num = 1
for i in range(1, n+1):
    num *= i
for n in pr:
    tmp = num
    ct = 0
    while True:
        if tmp % n == 0:
            ct += 1
            tmp //= n
        else:
            break
    if ct >= 74:
        arr[0] += 1
    elif ct >= 24:
        arr[1] += 1
    elif ct >= 14:
        arr[2] += 1
    elif ct >= 4:
        arr[3] += 1
    elif ct >= 2:
        arr[4] += 1
ans = 0
if arr[0] == 1:
    ans += 1
if sum(arr[:2]) >= 1:
    ans += ((sum(arr[0:2]) * (sum(arr) - 1)))
if sum(arr[:3]) >= 1:
    ans += ((sum(arr[0:3]) * (sum(arr[:4]) - 1)))
if sum(arr[:4]) >= 2 and arr[4] >= 1:
    s = sum(arr[:4])
    ans += (s * (s-1) * (s-2) // 2)
    ans += (arr[4] * s * (s-1) // 2)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
N=int(input())
div=[0]*(N+1)

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

print(div)

a,b,c,d,e=0,0,0,0,0
for i in range(N+1):
    if div[i]>74: e+=1
    if div[i]>24:
        a+=1
        b+=1
        c+=1
        d+=1
    elif div[i]>14: 
        a+=1
        b+=1
        c+=1
    elif div[i]>=4:
        a+=1
        b+=1
    elif div[i]>=2:
        a+=1



print(a,b,c,d,e)

if a<3 or b<2: print(0)
else:
    ans=b*(b-1)*(a-2)//2
    ans+=d*(a-1)
    ans+=c*(b-1)
    ans+=e
    print(ans)

N=int(input())
div=[0]*(N+1)

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

a,b,c,d,e=0,0,0,0,0
for i in range(N+1):
    if div[i]>=74:
        a+=1
        b+=1
        c+=1
        d+=1
        e+=1
    elif div[i]>=24:
        a+=1
        b+=1
        c+=1
        d+=1
    elif div[i]>=14: 
        a+=1
        b+=1
        c+=1
    elif div[i]>=4:
        a+=1
        b+=1
    elif div[i]>=2:
        a+=1

if a<3 or b<2: print(0)
else:
    ans=b*(b-1)*(a-2)//2
    ans+=d*(a-1)
    ans+=c*(b-1)
    ans+=e
    print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
import numpy as np
n=int(input())
d=[0]*101
def factorization(n):
    temp = n
    for i in range(2, int(n**0.5)+1):
        if temp%i==0:
            while temp%i==0:
                d[i]+=1
                temp //= i
    if temp!=1:
        d[temp]+=1
def cnt(k):
    return len(d[d>=k])
for i in range(2,n+1):
    factorization(i)
d=np.array(list(d.values()))
print(cnt(74)+cnt(24)*(cnt(2)-1)+cnt(14)*(cnt(4)-1)+cnt(4)*(cnt(4)-1)*(cnt(2)-2)//2)

import numpy as np
n=int(input())
d=np.zeros(101)
def factorization(n):
    temp = n
    for i in range(2, int(n**0.5)+1):
        if temp%i==0:
            while temp%i==0:
                d[i]+=1
                temp //= i
    if temp!=1:
        d[temp]+=1
def cnt(k):
    return len(d[d>=k])
for i in range(2,n+1):
    factorization(i)
print(cnt(74)+cnt(24)*(cnt(2)-1)+cnt(14)*(cnt(4)-1)+cnt(4)*(cnt(4)-1)*(cnt(2)-2)//2)

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
x=[]

for j in range(100):
    m=j+1
    pf={}
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:pf[m]=1
    x.append(pf)

N=int(input())
if N==1:
    print(0)
    exit()

from collections import defaultdict
d=defaultdict(int)
for i in range(1,N):
    for k in x[i].keys():
        d[k]+=x[i][k]

print(d)
over2=0
over4=0
over14=0
over24=0
over74=0
for k in d.keys():
    if d[k]>=2:
        over2+=1
    if d[k]>=4:
        over4+=1
    if d[k]>=14:
        over14+=1
    if d[k]>=24:
        over24+=1
    if d[k]>=74:
        over74+=1

ans=0
#case1
ans+=over4*(over4-1)//2*(over2-2)
#case2
ans+=over14*(over4-1)
#case3
ans+=over24*(over2-1)
#case4
ans+=over74
print(ans)

x=[]

for j in range(100):
    m=j+1
    pf={}
    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:pf[m]=1
    x.append(pf)

N=int(input())
if N==1:
    print(0)
    exit()

from collections import defaultdict
d=defaultdict(int)
for i in range(1,N):
    for k in x[i].keys():
        d[k]+=x[i][k]

#print(d)
over2=0
over4=0
over14=0
over24=0
over74=0
for k in d.keys():
    if d[k]>=2:
        over2+=1
    if d[k]>=4:
        over4+=1
    if d[k]>=14:
        over14+=1
    if d[k]>=24:
        over24+=1
    if d[k]>=74:
        over74+=1

ans=0
#case1
ans+=over4*(over4-1)//2*(over2-2)
#case2
ans+=over14*(over4-1)
#case3
ans+=over24*(over2-1)
#case4
ans+=over74
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
import copy
def getPrimes(n):
    res = {}
    for i in range(2, n+1):
        if n % i == 0:
            res[i] = 0
            while n % i == 0:
                res[i] = res[i] + 1
                n = n // i
        if i * i > n:
            break;
        
    if n != 1:
        res[n] = 1
    return res

def add(a, b):
    res = copy.deepcopy(a)
    for i in b:
        if i in res:
            res[i] = res[i] + b[i]
        else:
            res[i] = b[i]
    return res

N = int(input())
cnt = {}
for i in range(1, N+1):
    cnt = add(cnt, getPrimes(i))

num = []
for i in cnt:
    num.append(cnt[i])
num.sort()
print(num)
ans  = 0
for i in range(len(num)):
    for j in range(len(num)):
        for k in range(j + 1, len(num)):
            if i == j or i == k:
                continue
            if num[i] >= 2 and num[j] >= 4 and num[k] >= 4:
                ans = ans + 1
                
for i in range(len(num)):
    for j in range(len(num)):
        if i != j and num[i] >= 2 and num[j] >= 24:
            ans = ans + 1
            
for i in range(len(num)):
    for j in range(len(num)):
        if i != j and num[i] >= 4 and num[j] >= 14:
            ans = ans + 1
            
for i in range(len(num)):
    if num[i] >= 74:

        
        ans = ans + 1
print(ans)




import copy
def getPrimes(n):
    res = {}
    for i in range(2, n+1):
        if n % i == 0:
            res[i] = 0
            while n % i == 0:
                res[i] = res[i] + 1
                n = n // i
        if i * i > n:
            break;
        
    if n != 1:
        res[n] = 1
    return res

def add(a, b):
    res = copy.deepcopy(a)
    for i in b:
        if i in res:
            res[i] = res[i] + b[i]
        else:
            res[i] = b[i]
    return res

N = int(input())
cnt = {}
for i in range(1, N+1):
    cnt = add(cnt, getPrimes(i))

num = []
for i in cnt:
    num.append(cnt[i])
num.sort()
ans  = 0
for i in range(len(num)):
    for j in range(len(num)):
        for k in range(j + 1, len(num)):
            if i == j or i == k:
                continue
            if num[i] >= 2 and num[j] >= 4 and num[k] >= 4:
                ans = ans + 1
                
for i in range(len(num)):
    for j in range(len(num)):
        if i != j and num[i] >= 2 and num[j] >= 24:
            ans = ans + 1
            
for i in range(len(num)):
    for j in range(len(num)):
        if i != j and num[i] >= 4 and num[j] >= 14:
            ans = ans + 1
            
for i in range(len(num)):
    if num[i] >= 74:

        
        ans = ans + 1
print(ans)




Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):


def cmb(n,r):
  	if n ==1:
      return 0
    else:
      r=min(r,n-r)
      result=1
      for i in range(n-r+1,n+1):
          result*=i
      for i in range(1,r+1):
          result//=i
      return result


def factorize(n):
    i=2
    result={}
    while True:
        if i**2>n:
            break
        count=0
        while n%i==0:
            n//=i
            count+= 1
        if count!=0:
            result[i]=count
        i+=1
    if n>1:
        result[n]=1
    return result

N = int(input())
l={}
for i in range(1,N+1):
    for i,j in factorize(i).items():
        l[i] = l.get(i,0)+j


l2 = [0]*5

r = 0
for j,i in l.items():
    if i>=74:
        l2[4]+=1
    elif i>=24:
        l2[3]+=1
    elif i>=14:
        l2[2]+=1
    elif i>=4:
        l2[1]+=1
    elif i>=2:
        l2[0]+=1
# print(l)
# print(l2)

r += l2[4]
r += sum(l2[3:])*(sum(l2)-1)
r += sum(l2[2:])*(sum(l2[1:])-1)
r += cmb(sum(l2[1:]),2)*(sum(l2)-2)
print(r)


def cmb(n,r):
    if n==0:return 0
    else:
        r=min(r,n-r)
        result=1
        for i in range(n-r+1,n+1):
            result*=i
        for i in range(1,r+1):
            result//=i
        return result


def factorize(n):
    i=2
    result={}
    while True:
        if i**2>n:
            break
        count=0
        while n%i==0:
            n//=i
            count+= 1
        if count!=0:
            result[i]=count
        i+=1
    if n>1:
        result[n]=1
    return result

N = int(input())
l={}
for i in range(1,N+1):
    for i,j in factorize(i).items():
        l[i] = l.get(i,0)+j


l2 = [0]*5

r = 0
for j,i in l.items():
    if i>=74:
        l2[4]+=1
    elif i>=24:
        l2[3]+=1
    elif i>=14:
        l2[2]+=1
    elif i>=4:
        l2[1]+=1
    elif i>=2:
        l2[0]+=1
print(l)
print(l2)

r += l2[4]
r += sum(l2[3:])*(sum(l2)-1)
r += sum(l2[2:])*(sum(l2[1:])-1)
r += cmb(sum(l2[1:]),2)*(sum(l2)-2)
print(r)


def cmb(n,r):
    if n==0:return 0
    else:
        r=min(r,n-r)
        result=1
        for i in range(n-r+1,n+1):
            result*=i
        for i in range(1,r+1):
            result//=i
        return result


def factorize(n):
    i=2
    result={}
    while True:
        if i**2>n:
            break
        count=0
        while n%i==0:
            n//=i
            count+= 1
        if count!=0:
            result[i]=count
        i+=1
    if n>1:
        result[n]=1
    return result

N = int(input())
l={}
for i in range(1,N+1):
    for i,j in factorize(i).items():
        l[i] = l.get(i,0)+j


l2 = [0]*5

r = 0
for j,i in l.items():
    if i>=74:
        l2[4]+=1
    elif i>=24:
        l2[3]+=1
    elif i>=14:
        l2[2]+=1
    elif i>=4:
        l2[1]+=1
    elif i>=2:
        l2[0]+=1

r += l2[4]
r += sum(l2[3:])*(sum(l2)-1)
r += sum(l2[2:])*(sum(l2[1:])-1)
r += cmb(sum(l2[1:]),2)*(sum(l2)-2)
print(r)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
import sys


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def factorization(N):
    d = {}
    for n in range(2, N + 1):
        tmp = n
        for i in range(2, int(n ** 0.5) + 1):
            if tmp % i == 0:
                cnt = 0
                while tmp % i == 0:
                    cnt += 1
                    tmp //= i
                if i not in d:
                    d[i] = cnt
                else:
                    d[i] += cnt

        if tmp != 1:
            if tmp not in d:
                d[tmp] = 1
            else:
                d[tmp] += 1

    return d


def main():
    N = int(input())
    d = factorization(N)
    d = [v for k, v in d.items() if v > 1]
    n = len(d)
    print(d)
    ans = 0
    for i in range(n):
        val = d[i]
        if val >= 74:
            ans += 1

        if val >= 24:
            ans += n - 1

        if val >= 14:
            cnt = 0
            for j in range(n):
                if i == j:
                    continue
                if d[j] >= 4:
                    cnt += 1
            ans += cnt

    cnt_4 = 0
    cnt_2 = 0
    for i in range(n):
        if d[i] >= 4:
            cnt_4 += 1
        else:
            cnt_2 += 1

    ans += (cnt_4 - 1) * cnt_4 // 2 * cnt_2
    ans += (cnt_4 - 2) * (cnt_4 - 1) * cnt_4 // 2

    print(ans)


if __name__ == "__main__":
    main()


import sys


sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


def factorization(N):
    d = {}
    for n in range(2, N + 1):
        tmp = n
        for i in range(2, int(n ** 0.5) + 1):
            if tmp % i == 0:
                cnt = 0
                while tmp % i == 0:
                    cnt += 1
                    tmp //= i
                if i not in d:
                    d[i] = cnt
                else:
                    d[i] += cnt

        if tmp != 1:
            if tmp not in d:
                d[tmp] = 1
            else:
                d[tmp] += 1

    return d


def main():
    N = int(input())
    d = factorization(N)
    d = [v for k, v in d.items() if v > 1]
    cnt = {2: 0, 4: 0, 14: 0, 24: 0, 74: 0}
    cnt[2] = len(d)
    for i in range(len(d)):
        val = d[i]
        if val >= 74:
            cnt[74] += 1
        if val >= 24:
            cnt[24] += 1
        if val >= 14:
            cnt[14] += 1
        if val >= 4:
            cnt[4] += 1

    ans = cnt[74]
    ans += cnt[24] * (cnt[2] - 1)
    ans += cnt[14] * (cnt[4] - 1)
    ans += cnt[4] * (cnt[4] - 1) // 2 * (cnt[2] - 2)

    print(ans)


if __name__ == "__main__":
    main()


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
def check(m, e):
    return len(list(filter(lambda x: x >= m - 1, e)))


def check_1(m, e):
    return list(filter(lambda x: x >= m - 1, e))


def main():
    N = int(input())
    e = [0] * (N + 1)

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

    print(check_1(25, e), check_1(3, e))
    print(check(75, e) +
          check(25, e) * (check(3, e) - 1) +
          check(15, e) * (check(5, e) - 1) +
          check(5, e) * (check(5, e) - 1) * (check(3, e) - 2) // 2)


if __name__ == '__main__':
    main()


def check(m, e):
    return len(list(filter(lambda x: x >= m - 1, e)))


def main():
    N = int(input())
    e = [0] * (N + 1)

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

    print(check(75, e) +
          check(25, e) * (check(3, e) - 1) +
          check(15, e) * (check(5, e) - 1) +
          check(5, e) * (check(5, e) - 1) * (check(3, e) - 2) // 2)


if __name__ == '__main__':
    main()


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

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

def prime_fact(x):
    fact=[]
    for i in range(2, int(x**(0.5))+1):
        while x%i==0:
            fact.append(i)
            x//=i
    if x!=1:
        fact.append(x)
    if not fact:
        fact=[x]
    return fact

print(prime_fact(n))

def eratosthenes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
p=eratosthenes(100)
d={}
for p_i in p:
    d[p_i]=0
for i in range(2,n+1):
    pf=prime_fact(i)
    for pf_i in pf:
        d[pf_i]+=1
print(d)

cnt74=0
cnt24=0
cnt14=0
cnt4=0
cnt2=0

for key in d:
    if d[key]>=74:
        cnt74+=1
    if d[key]>=24:
        cnt24+=1
    if d[key]>=14:
        cnt14+=1
    if d[key]>=4:
        cnt4+=1
    if d[key]>=2:
        cnt2+=1

print(cnt74,cnt24,cnt14,cnt4,cnt2)

print(int(cnt74+(cnt2-1)*cnt24+(cnt4-1)*cnt14+(cnt2-2)*cnt4*(cnt4-1)/2))


n=int(input())

def prime_fact(x):
    fact=[]
    for i in range(2, int(x**(0.5))+1):
        while x%i==0:
            fact.append(i)
            x//=i
    if x!=1:
        fact.append(x)
    if not fact:
        fact=[x]
    return fact

def eratosthenes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
p=eratosthenes(100)
d={}
for p_i in p:
    d[p_i]=0
for i in range(2,n+1):
    pf=prime_fact(i)
    for pf_i in pf:
        d[pf_i]+=1

cnt74=0
cnt24=0
cnt14=0
cnt4=0
cnt2=0

for key in d:
    if d[key]>=74:
        cnt74+=1
    if d[key]>=24:
        cnt24+=1
    if d[key]>=14:
        cnt14+=1
    if d[key]>=4:
        cnt4+=1
    if d[key]>=2:
        cnt2+=1

print(int(cnt74+(cnt2-1)*cnt24+(cnt4-1)*cnt14+(cnt2-2)*cnt4*(cnt4-1)/2))


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):

import numpy as np

def prime_factorize(N): 
    exponent = 0
    while N%2 == 0:
        exponent += 1
        N //= 2
    if exponent: factorization = [[2,exponent]]
    else: factorization = []
    i=1
    while i*i <=N:
        i += 2
        if N%i: continue
        exponent = 0
        while N%i == 0:
            exponent += 1
            N //= i
        factorization.append([i,exponent])
    if N!= 1: factorization.append([N,1])
    assert N != 0, "zero"
    return factorization

factors = [0]*100
N = int(input())

for i in range(1,N+1):
    for p,n in prime_factorize(i):
        factors[p] += n

factors = np.array(factors)
ov2 = len(factors[factors >= 2])
ov4 = len(factors[factors >= 4])
ov14 = len(factors[factors >= 14])
ov24 = len(factors[factors >= 24])
ov74 = len(factors[factors >= 74])
print(ov2,ov4,ov14,ov24)
ans = 0
## 2*4*4
ans += (ov4-2)*(ov4)*(ov4-1)//2 + (ov2-ov4)*(ov4)*(ov4-1)//2

## 14 * 4
ans += (ov4-ov14)*(ov14) + (ov14)*(ov14-1)

## 24 * 2
ans += (ov2-ov24)*ov24 + (ov24)*(ov24-1)

## 74
ans += ov74

print(ans)


import numpy as np

def prime_factorize(N): 
    exponent = 0
    while N%2 == 0:
        exponent += 1
        N //= 2
    if exponent: factorization = [[2,exponent]]
    else: factorization = []
    i=1
    while i*i <=N:
        i += 2
        if N%i: continue
        exponent = 0
        while N%i == 0:
            exponent += 1
            N //= i
        factorization.append([i,exponent])
    if N!= 1: factorization.append([N,1])
    assert N != 0, "zero"
    return factorization

factors = [0]*100
N = int(input())

for i in range(1,N+1):
    for p,n in prime_factorize(i):
        factors[p] += n

factors = np.array(factors)
ov2 = len(factors[factors >= 2])
ov4 = len(factors[factors >= 4])
ov14 = len(factors[factors >= 14])
ov24 = len(factors[factors >= 24])
ov74 = len(factors[factors >= 74])
ans = 0
## 2*4*4
ans += (ov4-2)*(ov4)*(ov4-1)//2 + (ov2-ov4)*(ov4)*(ov4-1)//2

## 14 * 4
ans += (ov4-ov14)*(ov14) + (ov14)*(ov14-1)

## 24 * 2
ans += (ov2-ov24)*ov24 + (ov24)*(ov24-1)

## 74
ans += ov74

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
n=int(input())
e=[0]*(n+1)
for i in range(2,n+1):
    cur=i
    for j in range(2,i+1):
        while cuur%j==0:
            e[j]+=1
            cur//=j
def num(m):
    return len(list(filter(lambda  x: x>=m-1,e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)


n=int(input())
e=[0]*(n+1)
for i in range(2,n+1):
    cur=i
    for j in range(2,i+1):
        e[j]+=1
        cur//=j
def num(m):
    return len(list(filter(lambda  x: x>=m-1,e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)


n=int(input())
e=[0]*(n+1)
for i in range(2,n+1):
    cur=i
    for j in range(2,i+1):
        while cur%j==0:
            e[j]+=1
            cur//=j
def num(m):
    return len(list(filter(lambda  x: x>=m-1,e)))

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

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

import math


def isPrime(x):
  if x == 2:
    return True
  if x % 2 == 0:
    return False
  for i in range(3, int(math.sqrt(x)) + 1, 2):
    if x % i == 0:
      return False
  return True



#   if isPrime(i):



primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37,
          41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

pows = {}
for p in primes:
  if p > n:
    break
  pows[p] = 0
  pp = p
  while n // pp >= 1:
    pows[p] += n // pp
    pp *= p

e = []
for x in pows.values():
  e.append(x + 1)
print(e)

import itertools
ans = 0

for x in e:
  if x >= 75:
    ans += 1

for (x, y) in itertools.combinations(e, 2):
  #print(x, y)
  for a, b in [(25, 3), (15, 5), (5, 15), (3, 25)]:
    if x >= a and y >= b:
      ans += 1

for (x, y, z) in itertools.combinations(e, 3):
  
  for a, b, c in [[5, 5, 3], [5, 3, 5], [3, 5, 5]]:
    if x >= a and y >= b and z >= c:
      ans += 1

print(ans)


n = int(input())

# import math
# def isPrime(x):
#   if x == 2:
#     return True
#   if x % 2 == 0:
#     return False


#       return False
#   return True



#   if isPrime(i):



primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37,
          41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]

pows = {}
for p in primes:
  if p > n:
    break
  pows[p] = 0
  pp = p
  while n // pp >= 1:
    pows[p] += n // pp
    pp *= p

e = []
for x in pows.values():
  e.append(x + 1)
# print(e)

import itertools
ans = 0

for x in e:
  if x >= 75:
    ans += 1

for (x, y) in itertools.combinations(e, 2):
  #print(x, y)
  for a, b in [(25, 3), (15, 5), (5, 15), (3, 25)]:
    if x >= a and y >= b:
      ans += 1

for (x, y, z) in itertools.combinations(e, 3):
  
  for a, b, c in [[5, 5, 3], [5, 3, 5], [3, 5, 5]]:
    if x >= a and y >= b and z >= c:
      ans += 1

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
from collections import defaultdict as ddict
d = ddict(int)
for i in range(1,n):
  for p in range(2,int(i**.5)+2):
    while i%p == 0:
      d[p] += 1
      i//=p
f = [2,4,14,24,74]
g = [0]*5
for x in d.values():
  for i in range(5):
    if x >= f[i]:
      g[i] += 1
#3 5 5
#3 25
#15 5
#75
ans = f[1]*(f[1]-1)*(f[0]-2) + f[3]*(f[0]-1) + f[2]*(f[1]-1) + f[4]
print(ans)

from collections import defaultdict as ddict
d = ddict(int)
n = int(input())
for i in range(1,n+1):
  for p in range(2,int(i**.5)+2):
    while i%p == 0:
      d[p] += 1
      i//=p
  if i>1:
    d[i] += 1
g = [2,4,14,24,74]
f = [0]*5
for x in d.values():
  for i in range(5):
    if x >= g[i]:
      f[i] += 1
ans = f[1]*(f[1]-1)//2*(f[0]-2) + f[3]*(f[0]-1) + f[2]*(f[1]-1) + f[4]
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
000

N = int(input())

pn=[2];A=100
for L in range(3,A):
  chk=True
  for L2 in pn:
    if L%L2 == 0:chk=False
  if chk==True:pn.append(L)

mul = [0 for i in range(101)]
for i in range(1,N+1):
  for j in pn:
    if j > i:
      break
    temp = i
    while True:
      if temp%j == 0:
        temp /= j
        mul[j] += 1
        continue
      else:
        break
        
prime_num = []
for index, num in enumerate(mul):
  if num != 0:
    prime_num.append([index,num])

print(prime_num)
ans = 0

from itertools import combinations
nums442 = list(combinations(prime_num,3))
for num in nums442:
  if num[0][1]>=2 and num[1][1]>=4 and num[2][1]>=4:
    ans += 1
  if num[0][1]>=4 and num[1][1]>=2 and num[2][1]>=4:
    ans += 1
  if num[0][1]>=4 and num[1][1]>=4 and num[2][1]>=2:
    ans += 1


nums14_4 = list(combinations(prime_num,2))
for num in nums14_4:
  if num[0][1]>=14 and num[1][1]>=4:
    ans += 1
  if num[0][1]>=4 and num[1][1]>=14:
    ans += 1


nums24_2 = list(combinations(prime_num,2))
for num in nums24_2:
  if num[0][1]>=24 and num[1][1]>=2:
    ans += 1
  if num[0][1]>=2 and num[1][1]>=24:
    ans += 1
    

for num in prime_num:
  if num[0] >= 74:
    ans += 1
    
print(ans)

N = int(input())

pn=[2];A=100
for L in range(3,A):
  chk=True
  for L2 in pn:
    if L%L2 == 0:chk=False
  if chk==True:pn.append(L)

mul = [0 for i in range(101)]
for i in range(1,N+1):
  for j in pn:
    if j > i:
      break
    temp = i
    while True:
      if temp%j == 0:
        temp /= j
        mul[j] += 1
        continue
      else:
        break
        
prime_num = []
for index, num in enumerate(mul):
  if num != 0:
    prime_num.append([index,num])

ans = 0

from itertools import combinations
nums442 = list(combinations(prime_num,3))
for num in nums442:
  if num[0][1]>=2 and num[1][1]>=4 and num[2][1]>=4:
    ans += 1
  if num[0][1]>=4 and num[1][1]>=2 and num[2][1]>=4:
    ans += 1
  if num[0][1]>=4 and num[1][1]>=4 and num[2][1]>=2:
    ans += 1


nums14_4 = list(combinations(prime_num,2))
for num in nums14_4:
  if num[0][1]>=14 and num[1][1]>=4:
    ans += 1
  if num[0][1]>=4 and num[1][1]>=14:
    ans += 1


nums24_2 = list(combinations(prime_num,2))
for num in nums24_2:
  if num[0][1]>=24 and num[1][1]>=2:
    ans += 1
  if num[0][1]>=2 and num[1][1]>=24:
    ans += 1
    

for num in prime_num:
  if num[1] >= 74:
    ans += 1
    
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

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

l = []
for i in range(2,N+1):
    l.append(divisor_pl(i))
l = sum(l,[])
l.sort()

fac_dict = {}
fac_list = []
for key, value in itertools.groupby(l):
    fac_dict[str(key)] = len(list(value))
    fac_list.append(key)

count = 0

exp_list = []
for l in itertools.combinations(fac_list,3):
    a = []
    for i in range(3):
        a.append(fac_dict[str(l[i])])
    exp_list.append(a)

for l in exp_list:
    if all(i>=2 for i in l) and sum(i>=4 for i in l) >=2:
        count += 1


exp_list = []
for l in itertools.combinations(fac_list,2):
    a = []
    for i in range(2):
        a.append(fac_dict[str(l[i])])
    exp_list.append(a)

for l in exp_list:
    if all(i>=4 for i in l) and sum(i>=14 for i in l) >=1:
        count += 1


exp_list = []
for l in itertools.combinations(fac_list,2):
    a = []
    for i in range(2):
        a.append(fac_dict[str(l[i])])
    exp_list.append(a)

for l in exp_list:
    if all(i>=2 for i in l) and sum(i>=24 for i in l) >=1:
        count += 1


exp_list = []
for l in fac_list:
    exp_list.append(fac_dict[str(l)])

for l in exp_list:
    if l >= 74:
        count += 1
print(count)

N = int(input())
import itertools

def divisor_pl(num):
    l = []
    i = 2
    while num > 1:
        if num%i == 0:
            l.append(i)
            num = int(num/i)
        else:
            i += 1
    if num != 1:
        l.append(num)
    return l

l = []
for i in range(2,N+1):
    l.append(divisor_pl(i))
l = sum(l,[])
l.sort()

fac_dict = {}
fac_list = []
for key, value in itertools.groupby(l):
    fac_dict[str(key)] = len(list(value))
    fac_list.append(key)

count = 0

for l in itertools.combinations(fac_list,3):
    for i in range(3):
        if fac_dict[str(l[i%3])] >= 4 and fac_dict[str(l[(i+1)%3])] >= 4 and fac_dict[str(l[(i+2)%3])] >= 2:
            count+=1


for l in itertools.combinations(fac_list,2):
    for i in range(2):
        if fac_dict[str(l[i%2])] >= 14 and fac_dict[str(l[(i+1)%2])] >= 4:
            count+=1


for l in itertools.combinations(fac_list,2):
    for i in range(2):
        if fac_dict[str(l[i%2])] >= 24 and fac_dict[str(l[(i+1)%2])] >= 2:
            count+=1


for l in fac_list:
    if fac_dict[str(l)] >= 74:
        count += 1

print(count)


Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

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

def IsPrime(A):
    prime=[2]
    for a in range(3,A+1):
        for p in prime:
            if a%p==0:
                break
        else:
            prime.append(a)
    return prime


prime=IsPrime(N)

pcount={}
for p in prime:
    pcount[p]=0
for nn in range(2,N+1):
    for p in prime:
        n=nn
        if n<p:
            break
        while n%p==0:
            n//=p
            pcount[p]+=1
#print(pcount)
mcount={}
for i in [75,25,15,5,3]:
    mcount[i]=0
for p in prime:
    for i in [75,25,15,5,3]:
        if pcount[p]>=i-1:
            mcount[i]+=1
print(mcount)
print(mcount[75]+\
        mcount[25]*(mcount[3]-1)+\
        mcount[15]*(mcount[5]-1)+\
        mcount[5]*(mcount[5]-1)//2*(mcount[3]-2))
#75/25*3/15*5/5*5*3


N=int(input())

def IsPrime(A):
    prime=[2]
    for a in range(3,A+1):
        for p in prime:
            if a%p==0:
                break
        else:
            prime.append(a)
    return prime


prime=IsPrime(N)

pcount={}
for p in prime:
    pcount[p]=0
for nn in range(2,N+1):
    for p in prime:
        n=nn
        if n<p:
            break
        while n%p==0:
            n//=p
            pcount[p]+=1
#print(pcount)
mcount={}
for i in [75,25,15,5,3]:
    mcount[i]=0
for p in prime:
    for i in [75,25,15,5,3]:
        if pcount[p]>=i-1:
            mcount[i]+=1
#print(mcount)
print(mcount[75]+\
        mcount[25]*(mcount[3]-1)+\
        mcount[15]*(mcount[5]-1)+\
        mcount[5]*(mcount[5]-1)//2*(mcount[3]-2))
#75/25*3/15*5/5*5*3


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

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

elem = [0 for _ in range(N+1)]

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

def num(m):
    return len(list(filter(lambda x: x >= m-1, elem)))

print(num(75)  + num(25)*(num(3)-1) + num(15)*(num(3)-1) + num(5)*(num(5)-1)*(num(3)-2) // 2)


N = int(input())

elem = [0 for _ in range(N+1)]

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

def num(m):
    return len(list(filter(lambda x: x >= m-1, elem)))

print(num(75)  + num(25)*(num(3)-1) + num(15)*(num(5)-1) + num(5)*(num(5)-1)*(num(3)-2) // 2)


Verdicts: Time Limit Exceeded

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
N = int(input())
e = [0] * (N+1)

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

def num(m): 
    return len(list(filter(lambda x: x >= m-1, e)))

answer = num(75) + num(25) * (num(3)-1) + num(15) * (num(5) - 1)
    + num(5) * (num(5) - 1) * (num(3) - 2) // 2)

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
exp = [0] * (N+1)
for i in range(2, N+1):
    cur = i
    for p in range(2, i+1):
        while cur % p == 0:
            exp[p] += 1
            cur //= p

def num(x):
    
    return len(list(filter(lambda y: y >= x-1, exp)))

answer = num(75) + num(25) * (num(3)-1) + num(15) * (num(5)-1)\
        + num(5) * (num(5)-1) * (num(3)-2) // 2
print(answer)


Verdicts: Runtime Error

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
import sys
import collections
from collections import Counter
# from collections import deque
# from collections import defaultdict
import itertools
# from itertools import accumulate
# from itertools import permutations
# from itertools import combinations
# from itertools import takewhile
# from itertools import compress
# import functools
# from functools import reduce
import math
# from math import gcd
# from math import inf
# from math import ceil
# from math import floor
# from math import log10
# from math import log2
# from math import log
from math import factorial

# import re

N = int(input())


def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n //= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table


P = prime_decomposition(factorial(N))
C = Counter(P)

n2, n4, n14, n24, n74 = [0] * 5

for k, v in C.items():
    n2 += 1 if v >= 2 else 0
    n4 += 1 if v >= 4 else 0
    n14 += 1 if v >= 14 else 0
    n24 += 1 if v >= 24 else 0
    n74 += 1 if v >= 74 else 0

p1, p2, p3, p4 = [0] * 4
p1 = n4 * (n4 - 1) * (n2 - 1) // 2
p2 = n14 * (n14 - 1)
p3 = n74
p4 = n24 * (n24 - 1)

print(sum([p1, p2, p3, p4]))



import sys
import collections
from collections import Counter
# from collections import deque
# from collections import defaultdict
import itertools
# from itertools import accumulate
# from itertools import permutations
# from itertools import combinations
# from itertools import takewhile
# from itertools import compress
# import functools
# from functools import reduce
import math
# from math import gcd
# from math import inf
# from math import ceil
# from math import floor
# from math import log10
# from math import log2
# from math import log
from math import factorial

# import re

N = int(input())


def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n //= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table


P = prime_decomposition(factorial(N))
C = Counter(P)

n2, n4, n14, n24, n74 = [0] * 5

for k, v in C.items():
    n2 += 1 if v >= 2 else 0
    n4 += 1 if v >= 4 else 0
    n14 += 1 if v >= 14 else 0
    n24 += 1 if v >= 24 else 0
    n74 += 1 if v >= 74 else 0

p1, p2, p3, p4 = [0] * 4
p1 = n4 * (n4 - 1) * (n2 - 2) // 2
p2 = n14 * (n4 - 1)
p3 = n74
p4 = n24 * (n2 - 1)

print(sum([p1, p2, p3, p4]))


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
n = int(input())
a = []

def judge(x):
    y = x
    for i in range(2,x):
        kk = y % i
        if i*i > x:
            return 1
        if kk == 0:
            return 0
    return 1

def solve(prime,x):
    cnt = 0
    while x:
        cnt += x//prime
        x //= prime
    return cnt

for i in range(2,n):
    if judge(i):
        a.append(i)
ans = 0
if n <= 9:
    ans = 0
else:
    ll = len(a)
    a2 = 0
    a4 = 0
    a14 = 0
    a24 = 0
    a74 = 0
    for i in range(ll):
        kk = solve(a[i],n)
        if kk >=2:
            a2 += 1
        if kk >=4:
            a4 += 1
        if kk >=14:
            a14 += 1
        if kk >=24:
            a24 += 1
        if kk >=74:
            a74 += 1
    print(a4*(a4-1)//2*(a2-2)+a14*(a4-1)+a24*(a2-1)+a74)

n=int(input())
d=dict()
for m in range(1,n+1):
    while m>1:
        for i in range(2,int(m**0.5)+1):
            if m%i==0:break
        else:i=m
        d[i]=d.get(i,0)+1
        m/=i
def num(n):
    return len(list(filter(lambda x:x>=n,d.values())))

print(num(74)+ num(24)*(num(2)-1)+ num(14)*(num(4)-1)+ num(4)*(num(4)-1)*(num(2)-2)//2)

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
def run(N):
  
  
  primes = {1: 1}
  for i in range(2, N+1):
    tmp = i
    for j in range(2, N+1):
      while tmp%j == 0:
        if j in primes.keys():
          primes[j] += 1
        else:
          primes[j] = 1
        tmp /= j
  print(primes)
  cnt = 0

  # (74,0,0)
  for i in primes.values():
    if i >= 74:
      cnt += 1

  # (2,4,4)
  cnt4 = 0
  cnt2 = 0
  for i in primes.values():
    if i >= 4:
      cnt4 += 1
    if i >= 2:
      cnt2 += 1
  if cnt4 >= 2:
    cnt += (cnt4*(cnt4-1)//2)*(cnt2-2)

  # (24,2,0)
  cnt24 = 0
  cnt2 = 0
  for i in primes.values():
    if i >= 24:
      cnt24 += 1
    if i >= 2:
      cnt2 += 1
  if cnt24 >= 1:
    cnt += cnt24*(cnt2-1)

  # (14,4,0)
  cnt14 = 0
  cnt4 = 0
  for i in primes.values():
    if i >= 14:
      cnt14 += 1
    if i >= 4:
      cnt4 += 1
  if cnt14 >= 1:
    cnt += cnt14*(cnt4-1)
  return cnt


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


if __name__ == '__main__':
    main()

def run(N):
  
  
  primes = {1: 1}
  for i in range(2, N+1):
    tmp = i
    for j in range(2, N+1):
      while tmp%j == 0:
        if j in primes.keys():
          primes[j] += 1
        else:
          primes[j] = 1
        tmp /= j
  cnt = 0

  # (74,0,0)
  for i in primes.values():
    if i >= 74:
      cnt += 1

  # (2,4,4)
  cnt4 = 0
  cnt2 = 0
  for i in primes.values():
    if i >= 4:
      cnt4 += 1
    if i >= 2:
      cnt2 += 1
  if cnt4 >= 2:
    cnt += (cnt4*(cnt4-1)//2)*(cnt2-2)

  # (24,2,0)
  cnt24 = 0
  cnt2 = 0
  for i in primes.values():
    if i >= 24:
      cnt24 += 1
    if i >= 2:
      cnt2 += 1
  if cnt24 >= 1:
    cnt += cnt24*(cnt2-1)

  # (14,4,0)
  cnt14 = 0
  cnt4 = 0
  for i in primes.values():
    if i >= 14:
      cnt14 += 1
    if i >= 4:
      cnt4 += 1
  if cnt14 >= 1:
    cnt += cnt14*(cnt4-1)
  return cnt


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


if __name__ == '__main__':
    main()

Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

def conb(n,r): 
    if n<r: return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def prime_factorize(n):
    if n == 1:
        return [1]
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = inp()
d = defaultdict(int)
for i in range(1,n+1):
    for x in prime_factorize(i):
        d[x] += 1

valist = d.values()
c = [2,4,14,24,74]
cnt = [0] * 5
for x in valist:
    if x >= 74: cnt[4] += 1
    elif x >= 24: cnt[3] += 1
    elif x >= 14: cnt[2] += 1
    elif x >= 4: cnt[1] += 1
    elif x >= 2: cnt[0] += 1
print(cnt)
res = 0
a = sum(cnt[1:]); b = cnt[0]
res += conb(a,3) + conb(a,2)*b
a = sum(cnt[2:]); b = cnt[1]
res += conb(a,2) + a*b
a = sum(cnt[3:]); b = sum(cnt[:3])
res += conb(a,2) + a*b
res += cnt[4]
print(res)

from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

def conb(n,r): 
    if n<r: return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def prime_factorize(n):
    if n == 1:
        return [1]
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = inp()
d = defaultdict(int)
for i in range(1,n+1):
    for x in prime_factorize(i):
        d[x] += 1

valist = d.values()
c = [2,4,14,24,74]
cnt = [0] * 5
for x in valist:
    if x >= 74: cnt[4] += 1
    elif x >= 24: cnt[3] += 1
    elif x >= 14: cnt[2] += 1
    elif x >= 4: cnt[1] += 1
    elif x >= 2: cnt[0] += 1
# print(cnt)
res = 0
a = sum(cnt[1:]); b = cnt[0]
res += conb(a,3)*3 + conb(a,2)*b
a = sum(cnt[2:]); b = cnt[1]
res += a*(a-1) + a*b
a = sum(cnt[3:]); b = sum(cnt[:3])
res += a*(a-1) + a*b
res += cnt[4]
print(res)


Verdicts: Wrong Answer

Accepted
Problem: You are given an integer N. Among the divisors of N! (= 1 \times 2 \times ... \times N), how many _Shichi-Go numbers_ (literally "Seven-Five numbers") are there?  Here, a Shichi-Go number is a positive integer that has exactly 75 divisors.

Submission attempts (in order):
def find_prime_factor(num):
    if num & 1 == 0:
        return 2
    for i in range(3, int(num ** (1 / 2)) + 1):
        if num % i == 0:
            return i
    return num


def prime_factorization(num):
    subtract = num
    result = []
    while subtract > 1:
        factor = find_prime_factor(subtract)
        result.append(factor)
        subtract //= factor
    return result


n = int(input())

# prime and prime's power.
power = {}
for i in range(1, n + 1):
    for prime in prime_factorization(i):
        if prime in power:
            power[prime] += 1
        else:
            power[prime] = 1

count75 = 0
count25 = 0
count15 = 0
count5 = 0
count3 = 0
for count in power.values():
    if count >= 74:
        count75 += 1
    elif count >= 24:
        count25 += 1
    elif count >= 14:
        count15 += 1
    elif count >= 4:
        count5 += 1
    elif count >= 2:
        count3 += 1

print(count75, count25, count15, count5, count3)

sum25 = count75 + count25
sum15 = count75 + count25 + count15
sum5 = count75 + count25 + count15 + count5
sum3 = count75 + count25 + count15 + count5 + count3
ans = count75 + sum25 * (sum3 - 1) + sum15 * (sum5 - 1) + (sum5 * (sum5 - 1) * (sum3 - 2)) // 2

print(ans)

def find_prime_factor(num):
    if num & 1 == 0:
        return 2
    for i in range(3, int(num ** (1 / 2)) + 1):
        if num % i == 0:
            return i
    return num


def prime_factorization(num):
    subtract = num
    result = []
    while subtract > 1:
        factor = find_prime_factor(subtract)
        result.append(factor)
        subtract //= factor
    return result


n = int(input())

# prime and prime's power.
power = {}
for i in range(1, n + 1):
    for prime in prime_factorization(i):
        if prime in power:
            power[prime] += 1
        else:
            power[prime] = 1

count75 = sum(1 for count in power.values() if count >= 74)
count25 = sum(1 for count in power.values() if count >= 24)
count15 = sum(1 for count in power.values() if count >= 14)
count5 = sum(1 for count in power.values() if count >= 4)
count3 = sum(1 for count in power.values() if count >= 2)

ans = count75 \
      + count25 * (count3 - 1) \
      + count15 * (count5 - 1) \
      + (count5 * (count5 - 1) * (count3 - 2)) // 2

print(ans)


Verdicts: Wrong Answer

Accepted