qyliang/CodeNanoFix huggingface dataset:
Buggy code:
from collections import defaultdict as dd
from itertools import permutations as p

def factorize(n):
    d = dd(int)
    for i in range(2, int(n**0.5)+1):
        while n%i==0:
            d[i] += 1
            n //= i
        if not n:
            break
    if n>1:
        d[n] += 1
    return d

N = int(input())
d = defaultdict(int)
for i in range(1, N+1):
    e = factorize(i)
    for i,j in e.items():
        d[i] += j

ans = 0
for i, j, k in p(d.values(), 3):    
    if i>=2 and j>=4 and k>=4:
        ans += 1
ans //= 2

for i, j in p(d.values(), 2):
    if i>=2 and j>=24:
        ans += 1
    if i>=4 and j>=14:
        ans += 1

for i in d.values():
    if i>=74:
        ans += 1

print(ans)

Fixed code:
from collections import defaultdict as dd
from itertools import permutations as p

def factorize(n):
    d = dd(int)
    for i in range(2, int(n**0.5)+1):
        while n%i==0:
            d[i] += 1
            n //= i
        if not n:
            break
    if n>1:
        d[n] += 1
    return d

N = int(input())
d = dd(int)
for i in range(1, N+1):
    e = factorize(i)
    for i,j in e.items():
        d[i] += j

ans = 0
for i, j, k in p(d.values(), 3):    
    if i>=2 and j>=4 and k>=4:
        ans += 1
ans //= 2

for i, j in p(d.values(), 2):
    if i>=2 and j>=24:
        ans += 1
    if i>=4 and j>=14:
        ans += 1

for i in d.values():
    if i>=74:
        ans += 1

print(ans)
Buggy code:
def wareru(n,k):
    res = 0
    for i in range(1,n):
        plus = n//(k**i)
        res+= plus
        if plus == 0:break
    return res
n = int(input())
prime = [2,3,5,7,11,13,17,19,23,27,29,31,37,41,43,47]
a = []
for p in prime :
    if wareru(n,p) > 1:
        a.append(wareru(n,p))
    else:break
cnt = [0]*5
for num in a:
    if num >= 74:
        cnt[0]+=1
    if num >= 24:
        cnt[1] +=1
    if num >= 14:
        cnt[2] += 1
    if num >= 4:
        cnt[3] += 1
    cnt[4]+= 1
ans = cnt[0]
ans += cnt[1]*(cnt[4]-1)
ans += cnt[2]*(cnt[3]-1)
ans += cnt[3]*(cnt[3]-1)*(cnt[4]-2)
print(cnt)
print(ans//2)

Fixed code:
def wareru(n,k):
    res = 0
    for i in range(1,n):
        plus = n//(k**i)
        res+= plus
        if plus == 0:break
    return res
n = int(input())
prime = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47]
a = []
for p in prime :
    if wareru(n,p) > 1:
        a.append(wareru(n,p))
    else:break
cnt = [0]*5
for num in a:
    if num >= 74:
        cnt[0]+=1
    if num >= 24:
        cnt[1] +=1
    if num >= 14:
        cnt[2] += 1
    if num >= 4:
        cnt[3] += 1
    cnt[4]+= 1
ans = cnt[0]
ans += cnt[1]*(cnt[4]-1)
ans += cnt[2]*(cnt[3]-1)
ans += cnt[3]*(cnt[3]-1)*(cnt[4]-2)//2
print(ans)
Buggy code:
from collections import defaultdict
n=int(input())
sosu_list=[2]
for i in range(3, 101, 2):
    flag=0
    for j in range(2, int(i**0.5)+2):
        if i%j==0:
            flag=1
    if flag==0:
        sosu_list.append(i)
print(sosu_list)
soinsu=defaultdict(int)
for i in sosu_list:
    temp=n
    while temp>=i:
        temp//=i
        soinsu[i]+=temp
kouho=soinsu.values()
cnt3=0
cnt5=0
cnt15=0
cnt25=0
cnt75=0
for a in kouho:
    if a>=2:
        cnt3+=1
    if a>=4:
        cnt5+=1
    if a>=14:
        cnt15+=1
    if a>=24:
        cnt25+=1
    if a>=74:
        cnt75+=1
ans=0
ans+=cnt75
ans+=cnt15*(cnt5-1)
ans+=cnt25*(cnt3-1)
if cnt3>=2:
    ans+=cnt5*(cnt5-1)*(cnt3-2)//2
        
print(ans)

Fixed code:
from collections import defaultdict
n=int(input())
sosu_list=[2]
for i in range(3, 101, 2):
    flag=0
    for j in range(2, int(i**0.5)+2):
        if i%j==0:
            flag=1
    if flag==0:
        sosu_list.append(i)
soinsu=defaultdict(int)
for i in sosu_list:
    temp=n
    while temp>=i:
        temp//=i
        soinsu[i]+=temp
kouho=soinsu.values()
cnt3=0
cnt5=0
cnt15=0
cnt25=0
cnt75=0
for a in kouho:
    if a>=2:
        cnt3+=1
    if a>=4:
        cnt5+=1
    if a>=14:
        cnt15+=1
    if a>=24:
        cnt25+=1
    if a>=74:
        cnt75+=1
ans=0
ans+=cnt75
ans+=cnt15*(cnt5-1)
ans+=cnt25*(cnt3-1)
if cnt3>=2:
    ans+=cnt5*(cnt5-1)*(cnt3-2)//2
        
print(ans)
Buggy code:
import collections
n=int(input())
def prime_factorize(n):
    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
c=collections.Counter()
for i in range(2,n+1):
    c+=collections.Counter(prime_factorize(i))
print(list(c.values()))
cnt1=0
cnt2=0
cnt3=0
cnt4=0
cnt5=0
cnt6=0
cnt7=0
for a in list(c.values()):
    if a>=4:
        cnt1+=1
    if a>=2:
        cnt2+=1

    if a>=14:
        cnt3+=1
    if a>=4:
        cnt4+=1

    if a>=24:
        cnt5+=1
    if a>=2:
        cnt6+=1

    if a>=74:
        cnt7+=1
print(cnt1*(cnt1-1)*(cnt2-2)//2+cnt3*(cnt4-1)+cnt5*(cnt6-1)+cnt7)


Fixed code:
import collections
n=int(input())
def prime_factorize(n):
    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
c=collections.Counter()
for i in range(2,n+1):
    c+=collections.Counter(prime_factorize(i))
#print(list(c.values()))
cnt1=0
cnt2=0
cnt3=0
cnt4=0
cnt5=0
cnt6=0
cnt7=0
for a in list(c.values()):
    if a>=4:
        cnt1+=1
    if a>=2:
        cnt2+=1

    if a>=14:
        cnt3+=1
    if a>=4:
        cnt4+=1

    if a>=24:
        cnt5+=1
    if a>=2:
        cnt6+=1

    if a>=74:
        cnt7+=1
print(cnt1*(cnt1-1)*(cnt2-2)//2+cnt3*(cnt4-1)+cnt5*(cnt6-1)+cnt7)
Buggy code:
N = int(input())
M = [0] * (101)

def prime_factorize(n):
    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

for i in range(2, N + 1):
  for m in prime_factorize(i):
    M[m] += 1
print(M[:N+1])

n3, n5, n15, n25, n75 = 0, 0, 0, 0, 0
for i in range(N+1):
  if M[i] >= 2:  n3  += 1
  if M[i] >= 4:  n5  += 1
  if M[i] >= 14: n15 += 1
  if M[i] >= 24: n25 += 1
  if M[i] >= 74: n75 += 1
#print(n3, n5, n15, n25, n75)   

answer = n75 + n25 * (n3 - 1) + n15 * (n5 - 1) + n5 * (n5 - 1) * (n3 - 2) // 2
print(answer)

Fixed code:
N = int(input())
M = [0] * (101)

def prime_factorize(n):
    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

for i in range(2, N + 1):
  for m in prime_factorize(i):
    M[m] += 1
#print(M[:N+1])

n3, n5, n15, n25, n75 = 0, 0, 0, 0, 0
for i in range(N+1):
  if M[i] >= 2:  n3  += 1
  if M[i] >= 4:  n5  += 1
  if M[i] >= 14: n15 += 1
  if M[i] >= 24: n25 += 1
  if M[i] >= 74: n75 += 1
#print(n3, n5, n15, n25, n75)   

answer = n75 + n25 * (n3 - 1) + n15 * (n5 - 1) + n5 * (n5 - 1) * (n3 - 2) // 2
print(answer)
Buggy code:
from collections import defaultdict

N = int(input())
prime = [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]
ans = 0
factor = defaultdict(int)
for i in range(1,N+1):
    for j in prime:
        while i != 1:
            if i % j == 0:
                factor[j] += 1
                i = i // j
            else:
                break

fact_l = list(dict(factor).items())
for i, x in enumerate(fact_l):
    if x[1] >= 74:
        n_74 = i + 1
    if x[1] >= 24:
        n_24 = i + 1
    if x[1] >= 14:
        n_14 = i + 1
    if x[1] >= 4:
        n_4 = i + 1
    if x[1] >= 2:
        n_2 = i + 1

print(n_74+n_24*(n_2-1)+n_14*(n_4-1)+n_4*(n_4-1)*(n_2-2)//2)

Fixed code:
from collections import defaultdict

N = int(input())
prime = [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]
ans = 0
factor = defaultdict(int)
for i in range(1,N+1):
    for j in prime:
        while i != 1:
            if i % j == 0:
                factor[j] += 1
                i = i // j
            else:
                break

fact_l = list(dict(factor).items())
fact_l.sort()
n_74 = 0
n_24 = 0
n_14 = 0
n_4 = 0
n_2 = 0
for i, x in enumerate(fact_l):
    if x[1] >= 74:
        n_74 = i + 1
    if x[1] >= 24:
        n_24 = i + 1
    if x[1] >= 14:
        n_14 = i + 1
    if x[1] >= 4:
        n_4 = i + 1
    if x[1] >= 2:
        n_2 = i + 1

print(n_74+(n_24*(n_2-1))+(n_14*(n_4-1))+(n_4*(n_4-1)*(n_2-2)//2))
Buggy code:
import collections

def prime_factorize(n):
    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 = int(input())
Prime=[]
for i in range(2,N+1):
  Prime +=prime_factorize(i)
  
c=collections.Counter(Prime)
P_count=c.values()

count_2=len([1 for x in P_count if x>=2])
count_4=len([1 for x in P_count if x>=4])
count_14=len([1 for x in P_count if x>=14])
count_24=len([1 for x in P_count if x>=24])
count_74=len([1 for x in P_count if x>=74])
answer=(count_2-1)*(count_4-1)*count_4//2+count_4*count_14+(count_2-1)*count_24+count_74
print(answer)

Fixed code:
import collections

def prime_factorize(n):
    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 = int(input())
Prime=[]
for i in range(2,N+1):
  Prime +=prime_factorize(i)
  
c=collections.Counter(Prime)
P_count=c.values()

count_2=len([1 for x in P_count if x>=2])
count_4=len([1 for x in P_count if x>=4])
count_14=len([1 for x in P_count if x>=14])
count_24=len([1 for x in P_count if x>=24])
count_74=len([1 for x in P_count if x>=74])
answer=(count_2-2)*(count_4-1)*count_4//2+(count_4-1)*count_14+(count_2-1)*count_24+count_74
print(answer)
Buggy code:
n=int(input())
if n<=9:
    print(0)
    exit()
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

    return arr
ans=[]
l=[]
for i in range(2,n+1):
    c=factorization(i)
    for j in c:
        if not j[0] in l:
            l.append(j[0])
            ans.append(j[1])
        else:
            ans[l.index(j[0])]+=j[1]
kai=0
k24=0
k2=0
k14=0
k4=0
for i in ans:
    if i>=74:
        kai+=1
    if i>=24:
        k24+=1
    if i>=2:
        k2+=1
    if i>=14:
        k14+=1
    if i>=4:
        k4+=1
print(kai+k24*k2+k14*k4+k2*k4*(k4-1)//2)


Fixed code:
n=int(input())
if n<=9:
    print(0)
    exit()
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

    return arr
ans=[]
l=[]
for i in range(2,n+1):
    c=factorization(i)
    for j in c:
        if not j[0] in l:
            l.append(j[0])
            ans.append(j[1])
        else:
            ans[l.index(j[0])]+=j[1]
kai=0
k24=0
k2=0
k14=0
k4=0
for i in ans:
    if i>=74:
        kai+=1
    if i>=24:
        k24+=1
    if i>=2:
        k2+=1
    if i>=14:
        k14+=1
    if i>=4:
        k4+=1
print(kai+k24*(k2-1)+k14*(k4-1)+(k2-2)*k4*(k4-1)//2)
Buggy code:
def slove():
    import sys
    import collections
    input = sys.stdin.readline

    n = int(input().rstrip('\n'))
    ls = []

    for i in range(1, n + 1):
        t = i
        for j in range(2, int(t ** 0.5) + 1):
            while True:
                if t % j == 0:
                    t //= j
                    ls.append(j)
                else:
                    break
        if t > 1:
            ls.append(t)

    ls = collections.Counter(ls)
    ls2 = []

    for k, v in ls.items():
        if v >= 74:
            ls2.append(75)
        if v >= 24:
            ls2.append(25)
        if v >= 14:
            ls2.append(15)
        if v >= 4:
            ls2.append(5)
        if v >= 2:
            ls2.append(3)

    ls2 = collections.Counter(ls2)
    cnt = 0s2[3]-1, 0))
    cnt += (ls2[15] * max(ls2[5]-1, 0))
    cnt += (ls2[5] * max(ls2[5]-1, 0) * max(ls2[3]-2, 0) // 2)
    print(cnt)


if __name__ == '__main__':
    slove()


Fixed code:
def slove():
    import sys
    import collections
    input = sys.stdin.readline

    n = int(input().rstrip('\n'))
    ls = []

    for i in range(1, n + 1):
        t = i
        for j in range(2, int(t ** 0.5) + 1):
            while True:
                if t % j == 0:
                    t //= j
                    ls.append(j)
                else:
                    break
        if t > 1:
            ls.append(t)

    ls = collections.Counter(ls)
    ls2 = []

    for k, v in ls.items():
        if v >= 74:
            ls2.append(75)
        if v >= 24:
            ls2.append(25)
        if v >= 14:
            ls2.append(15)
        if v >= 4:
            ls2.append(5)
        if v >= 2:
            ls2.append(3)

    ls2 = collections.Counter(ls2)
    cnt = 0
    cnt += (ls2[75])
    cnt += (ls2[25] * max(ls2[3]-1, 0))
    cnt += (ls2[15] * max(ls2[5]-1, 0))
    cnt += (ls2[5] * max(ls2[5]-1, 0) * max(ls2[3]-2, 0) // 2)
    print(cnt)


if __name__ == '__main__':
    slove()
Buggy code:
n = int(input())

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

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

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


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

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

from math import sqrt, ceil

primes = [2]
for n in range(3, 101):
    if any(n % i == 0 for i in range(2, n)):
        continue
    primes.append(n)

def fact(n):
    p = 1
    for i in range(2, n+1):
        p *= i
    return p

def calc_factors(n):
    factors = {}
    for p in primes:
        while n % p == 0:
            factors[p] = factors.get(p, 0)+1
            n //= p
    return factors

def solve(N):
    n = fact(N)
    factors = calc_factors(n)
    print("fact(%d)=%d" % (N, n))
    print("factors=", factors)
    #print("factors=", calc_factors(32400))
    print((2**8)*(3**4)*(5**2)*7)

    nums = {}
    for p, c in factors.items():
        if c >= 2:
            nums[3] = nums.get(3,0)+1
        if c >= 4:
            nums[5] = nums.get(5,0)+1
        if c >= 14:
            nums[15] = nums.get(15,0)+1
        if c >= 24:
            nums[25] = nums.get(25,0)+1
        if c >= 74:
            nums[75] = nums.get(75,0)+1
    print(sum([
            nums[5] * (nums[5] - 1) * (nums[3]-2) // 2,
            nums[15] * (nums[5] - 1) ,
            nums[25] * (nums[3] - 1) ,
            nums[75] ]))
N = int(input())
solve(N)


Fixed code:

from math import sqrt, ceil

primes = [2]
for n in range(3, 101):
    if any(n % i == 0 for i in range(2, n)):
        continue
    primes.append(n)

def fact(n):
    p = 1
    for i in range(2, n+1):
        p *= i
    return p

def calc_factors(n):
    factors = {}
    for p in primes:
        while n % p == 0:
            factors[p] = factors.get(p, 0)+1
            n //= p
    return factors

def solve(N):
    n = fact(N)
    factors = calc_factors(n)

    nums = {3:0,5:0,15:0,25:0,75:0}
    for p, c in factors.items():
        if c >= 2:
            nums[3] = nums.get(3,0)+1
        if c >= 4:
            nums[5] = nums.get(5,0)+1
        if c >= 14:
            nums[15] = nums.get(15,0)+1
        if c >= 24:
            nums[25] = nums.get(25,0)+1
        if c >= 74:
            nums[75] = nums.get(75,0)+1
    print(sum([
            nums[5] * (nums[5] - 1) * (nums[3]-2) // 2,
            nums[15] * (nums[5] - 1) ,
            nums[25] * (nums[3] - 1) ,
            nums[75] ]))
N = int(input())
solve(N)
Buggy code:
n = int(input())

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

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

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

Fixed code:
n = int(input())

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

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

print(num(75)+num(25)*(num(3)-1)+num(15)*(num(5)-1)+num(5)*(num(5)-1)*(num(3)-2)//2)
Buggy code:
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)

Fixed code:
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)
Buggy code:
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

# primes=[]
# for i in range(2,100):
#   if isPrime(i):
#     primes.append(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):
  #print(x, y, z)
  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)


Fixed code:
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

# primes=[]
# for i in range(2,100):
#   if isPrime(i):
#     primes.append(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):
  #print(x, y, z)
  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)
Buggy code:
from collections import defaultdict
import math
def Prime(n):
    num = int(math.sqrt(n))
    ls = []
    for i in range(2,num+1):
        while 1:
            if n%i == 0:
                n = n//i
                ls.append(i)
            else:
                break
    if n!=1:
        ls.append(n)
    return ls

def main():
    n = int(input())
    dc = defaultdict(int)
    for i in range(2,n+1):
        ls = Prime(i)
        for j in ls:
            dc[j] += 1
    ls = list(dc.values())
    lenth = len(ls)
    ans = 0
    #case1 a^74
    for i in range(lenth):
        if ls[i]>=74:
            ans +=1
    #case2 a^24 b^2
    for i in range(lenth):
        for j in range(i+1,lenth):
            if ls[i]>=24 and ls[j]>=2:
                ans +=1
    #case3 a^14 b^4
    for i in range(lenth):
        for j in range(i+1,lenth):
            if ls[i]>=14 and ls[j]>=4:
                ans +=1
    #case4 a^4 b^4 c^2
    for i in range(lenth):
        for j in range(i+1,lenth):
            for k in range(j+1,lenth):
                if ls[i]>=4 and ls[j]>=4 and ls[k]>=2:
                    ans += 1
    print(ans)
if __name__ == "__main__":
    main()

Fixed code:
from collections import defaultdict
import math
def Prime(n):
    num = int(math.sqrt(n))
    ls = []
    for i in range(2,num+1):
        while 1:
            if n%i == 0:
                n = n//i
                ls.append(i)
            else:
                break
    if n!=1:
        ls.append(n)
    return ls

def main():
    n = int(input())
    dc = defaultdict(int)
    for i in range(2,n+1):
        ls = Prime(i)
        for j in ls:
            dc[j] += 1
    ls = list(dc.values())

    lenth = len(ls)
    ans = 0
    #case1 a^74
    for i in range(lenth):
        if ls[i]>=74:
            ans +=1
    
    #case2 a^24 b^2
    for i in range(lenth):
        for j in range(lenth):
            if i==j:
                continue
            if ls[i]>=24 and ls[j]>=2:
                ans +=1
    
    #case3 a^14 b^4
    for i in range(lenth):
        for j in range(lenth):
            if i==j:
                continue
            if ls[i]>=14 and ls[j]>=4:
                ans +=1
    
    #case4 a^4 b^4 c^2
    for i in range(lenth):
        for j in range(lenth):
            if i==j:
                continue
            for k in range(lenth):
                if i==k or j==k:
                    continue
                if ls[i]>=4 and ls[j]>=4 and ls[k]>=2:
                    
                    ans += 0.5
    print(int(ans))

if __name__ == "__main__":
    main()