Problem:


Score : 300 points

Problem Statement

You are given an integer N.
Find the number of the positive divisors of N!, modulo 10^9+7.

Constraints

1≤N≤10^3

Input

The input is given from Standard Input in the following format:

N

Output

Print the number of the positive divisors of N!, modulo 10^9+7.

Sample Input 1

3

Sample Output 1

4

There are four divisors of 3! =6: 1, 2, 3 and 6. Thus, the output should be 4.

Sample Input 2

6

Sample Output 2

30

Sample Input 3

1000

Sample Output 3

972926972



Sample input:
3


Sample output:
4

Submission status: Wrong Answer

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

import math

x = int(input())

# 階乗
a = math.factorial(x)

aN = []
i = 1
# かけ合わせる数の左右逆はやる意味ない
while i <= a//i:
    # 約数として使えるものを追加していく
    if a % i == 0:
        aN.append(i)
        aN.append(a//i)
    i += 1
print(len(aN) % (10 ** 9 + 7))

Submission status: Wrong Answer

Solution code:
import math
def mark(s, x):
    for i in xrange(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in xrange(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in xrange(0,n) if s[i] and i > 1]

n = int(input())

arr = sieve(n+1)
f = math.factorial(n)

primes = [0 for i in range(n+1)]


for i in arr:
	while f%i == 0:
		f/= i
		primes[i] += 1

ans = 1
for i in primes:
	if i!= 0:
		ans *= i+1

print ans

Submission status: Wrong Answer

Solution code:
import math
def mark(s, x):
    for i in xrange(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in xrange(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in xrange(0,n) if s[i] and i > 1]

n = int(input())

arr = sieve(n+1)
f = math.factorial(n)

primes = [0 for i in range(n+1)]
print arr

for i in arr:
	while f%i == 0:
		f/= i
		primes[i] += 1

ans = 1
for i in primes:
	if i!= 0:
		ans *= i+1

print ans

Submission status: Wrong Answer

Solution code:
N=int(input())
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, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997]
def factorize(n,x):
    q,r=divmod(n,x)
    if r==0:
        return(1 + factorize(q,x))
    else:
        return(0)
def factors(n):
    ans=[]
    for p in primes:
        ans.append(factorize(n,p))
    return(ans)
def sumOflist(a,b):
    ans=[]
    for i in range(len(a)):
        ans.append(a[i]+b[i])
    return(ans)
numbers=[i for i in range(3,N+1)]
fTwo = factors(2)
import functools
answer = functools.reduce(lambda acc,b: sumOflist(acc,factors(b)),numbers,fTwo)
MOD=1000000007
ans = functools.reduce(lambda x,y: x*(y+1),answer,1)%MOD
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
m = 10**9+7
primes = [2,3,5,7,11,13,17,19,23,29,31]
D = [0]*1001


for i in range(2, n+1):
    v = i
    for p in range(2, 1000):
        while(v % p == 0):
            D[p] += 1
            v //= p
        if v == 1:
            break
    if(v == i):
        D[i] += 1

print(D)
score = 1
for d in D:
    score = score * (d + 1)
print(score % m)

Submission status: Wrong Answer

Solution code:
n = int(input())
m = pow(10, 9) + 7
primes = [2,3,5,7,11,13,17,19,23,29,31]
D = [0]*32

for i in range(2, n+1):
    for p in primes:
        #print(i, p)
        while(i % p == 0):
            D[p] += 1
            i //= p
        if i == 1:
            break

#print(D)
score = 1
for p in primes:
    score = score * (D[p] + 1)
#print(score)
print(score % m)

Submission status: Wrong Answer

Solution code:
n = int(input())
m = pow(10, 9) + 7
primes = [2,3,5,7,11,13,17,19,23,29,31]
D = [0]*32

for i in range(2, n+1):
    for p in primes:
        print(i, p)
        while(i % p == 0):
            D[p] += 1
            i //= p
        if i == 1:
            break

print(D)
score = 1
for p in primes:
    score = score * (D[p] + 1)
print(score)
print(score % m)

Submission status: Wrong Answer

Solution code:
from itertools import count
from math import factorial
from collections import Counter
N = int(input())

mod = 10**9 + 7

def prime_factors(n):
    factors = []
    for i in count(2):
        while n % i == 0:
            factors.append(i)
            n //= i
        if 2 * i > n:
            return factors

factors = prime_factors(factorial(N))
factors.append(1)
r = 1
for x in list(Counter(factors).values()):
    r *= x + 1

print(r % mod)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
d=defaultdict(int)
n=int(input())
s=set()
a=1
for i in range(2,n+1):
  p=True
  for j in s:
    if i % j==0:
      d[j]+=i//j
      p=False
  if p:
    d[i]+=1
    s|={i}
ans=1
m=10**9+7
for i,j in d.items():
  ans=(ans % m *(j+1)%m)%m
print(ans)

Submission status: Wrong Answer

Solution code:
def is_prime(x):
    m = 2
    while m * m <= x:
        if x % m == 0:
            return False
        m += 1

    return True


def main():
    n = int(input())
    p = [i for i in range(2, n+1) if is_prime(i)]
    cnt = [0 for i in range(len(p))]

    for i in range(2, n+1):
        idx = 0
        while idx < len(p) and p[idx] <= i:
            a = i
            while a % p[idx] == 0:
                cnt[idx] += 1
                a //= p[idx]

            idx += 1

    factor = 1
    for i in cnt:
        if i == 0:
            continue

        if factor >= 10 ** 9 + 7:
            factor %= 10 ** 9 + 7

        factor *= i + 1

    print(factor)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def is_prime(x):
    m = 2
    while m * m <= x:
        if x % m == 0:
            return False
        m += 1

    return True


def main():
    n = int(input())
    p = [i for i in range(2, n+1) if is_prime(i)]
    cnt = [0 for i in range(len(p))]

    for i in range(2, n+1):
        idx = 0
        while idx < len(p) and p[idx] <= n:
            a = i
            while a % p[idx] == 0:
                cnt[idx] += 1
                a //= p[idx]

            idx += 1

    factor = 1
    for i in cnt:
        if i == 0:
            continue

        if factor >= 10 ** 9 + 7:
            factor %= 10 ** 9 + 7

        factor *= i + 1

    print(factor)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def is_prime(x):
    m = 2
    while m * m <= x:
        if x % m == 0:
            return False
        m += 1

    return True


def main():
    n = int(input())
    p = [i for i in range(2, n+1) if is_prime(i)]
    cnt = [0 for i in range(len(p))]

    for i in range(2, n+1):
        idx = 0
        while idx < len(p) and p[idx] <= n:
            a = i
            while a % p[idx] == 0:
                cnt[idx] += 1
                a //= p[idx]

            idx += 1

    factor = 1
    for i in cnt:
        if i == 0:
            continue

        if factor > 10 ** 9 + 7:
            factor %= 10 ** 9 + 7

        factor *= i + 1

    print(factor)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

prime = []
for i in range(2, n):
    j = 2
    while j ** 2 <= i:
        if i % j == 0:
            break
        j += 1
    if j ** 2 > i:
        prime.append(i)
        
ans = 1

for p in prime:
    soinsu = 1
    for i in range(2, n + 1):
        while True:
            if i % p == 0:
                soinsu += 1
                i = int(i / p)
            else:
                break
    ans = (ans * soinsu) % (10 ** 9 + 7)
         
print(ans)

Submission status: Wrong Answer

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

    if N == 1:
        print(1)
        return

    lst = erastosthenes(N)
    plist = [i for i in range(3, N + 1, 2) if lst[i]]
    plist = [2] + plist

    mod = 1000000007
    ans = 1
    for p in plist:
        cnt = 0
        i = 1
        while 1:
            x = p ** i
            if x > N:
                break
            cnt += N // x
            i += 1
        ans = ans * (cnt + 1) % mod
    print(ans)

def erastosthenes(n):
    prime = [0, 1] * ((n + 1) // 2)
    if not n % 2:
        prime += [0]
    prime[1], prime[2] = 0, 1

    sqrt = n ** 0.5
    i = 3
    while i <= sqrt:
        for j in range(i ** 2, n, i):
            prime[j] = 0
        i += 2
    return prime

main()

Submission status: Wrong Answer

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

    if N == 1:
        print(1)
        return

    lst = erastosthenes(N)
    plist = [i for i in range(3, N + 1, 2) if lst[i]]
    plist = [2] + plist

    mod = 1000000007
    ans = 1
    for p in plist:
        cnt = 0
        for n in range(1, N + 1):
            if not n % p:
                while 1:
                    d, m = divmod(n, p)
                    if m:
                        break
                    else:
                        cnt += 1
                        n = d
        ans *= (cnt + 1)
        ans %= mod
    print(ans)

def erastosthenes(n):
    prime = [0, 1] * ((n + 1) // 2)
    if not n % 2:
        prime += [0]
    prime[1], prime[2] = 0, 1

    sqrt = n ** 0.5
    i = 3
    while i <= sqrt:
        for j in range(i ** 2, n, i):
            prime[j] = 0
        i += 2
    return prime

main()

Submission status: Wrong Answer

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

    if N == 1:
        print(1)
        return

    lst = erastosthenes(N)
    plist = [i for i in range(3, N + 1, 2) if lst[i]]
    plist = [2] + plist

    mod = 1000000007
    ans = 1
    for p in plist:
        cnt = 0
        i = 1
        while 1:
            x = p ** i
            if x > N:
                break
            cnt += N // x
            i += 1
        ans = ((ans % mod) * ((cnt + 1) % mod)) % mod
    print(ans)

def erastosthenes(n):
    prime = [0, 1] * ((n + 1) // 2)
    if not n % 2:
        prime += [0]
    prime[1], prime[2] = 0, 1

    sqrt = n ** 0.5
    i = 3
    while i <= sqrt:
        for j in range(i ** 2, n, i):
            prime[j] = 0
        i += 2
    return prime

main()

Submission status: Wrong Answer

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

    if N > 1:
        lst = erastosthenes(N)
    else:
        print(1)
        return

    plist = [i for i in range(3, N + 1, 2) if lst[i]]
    plist = [2] + plist

    mod = 1000000007
    ans = 1
    for p in plist:
        cnt = 0
        i = 1
        while 1:
            x = p ** i
            if x > N:
                break
            cnt += N // x
            i += 1
        ans = (ans % mod * (cnt + 1) % mod) % mod
    print(ans)

def erastosthenes(n):
    prime = [0, 1] * ((n + 1) // 2)
    if not n % 2:
        prime += [0]
    prime[1], prime[2] = 0, 1

    sqrt = n ** 0.5
    i = 3
    while i <= sqrt:
        for j in range(i ** 2, n, i):
            prime[j] = 0
        i += 2
    return prime

main()

Submission status: Wrong Answer

Solution code:
n = int(input())

def c(n, k):
    bunsi = p(n, k)
    bunbo = p(k, k)
    return int(bunsi/bunbo)

def p(n, k):
    res = 1
    for i in range(n-k+1, n+1):
        res *= i
    return res

total = 1
for i in range(1,n):
    total += c(n-1, i)

print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())
sum = 1
dict = {}
for i in range(2, n+1):
    j = 2
    while i > 1:
        if i%j == 0:
            i = i//j
            if j in dict:
                dict[j] += 1
            else:
                dict[j] = 1
            j -= 1
        j += 1
for i in dict.values():
    sum *= (i+1)
print(sum)

Submission status: Wrong Answer

Solution code:
N = int(input())
DIV = pow(10,9)+7
sum = 1
prime = []
stock = []
for i in range(2,N):
  for j in range(2,i):
    if i%j == 0:
      break
    if j==(i-1) and i%j !=0:
      prime.append(i)
for k in range(len(prime)):
  if N%prime[k]==0:
    stock.append(N/prime[k])
for j in range(len(stock)):
  sum *= (stock[j]+1)
print(sum)

Submission status: Wrong Answer

Solution code:
import sys
p=int(input())
n=1
for i in range(1,p+1):n*=i
nb=n
i=2
lis=[]
while(i*2<=nb):
  #print(n)
  count=0
  while(n%i==0):
    count+=1
    n=n//i
  if(count!=0):lis.append(count)
  i+=1
x=1
for i in lis:
  x*=(i+1)
  x%=10**9+7
print(x)

Submission status: Wrong Answer

Solution code:
import sys
p=int(input())
n=1
for i in range(1,p+1):n*=i
nb=n
i=2
lis=[]
while(i*2<=nb):
  #print(n)
  count=0
  while(n%i==0):
    count+=1
    n=n//i
  if(count!=0):lis.append(count)
  i+=1
x=1
for i in lis:
  x*=(i+1)
print(x)

Submission status: Wrong Answer

Solution code:
n=int(input())
import math
fac=math.factorial(n)
mod=10**9+7
ans=[0]*(n+1)
ans[0]=ans[1]=1
i=2
while i*i<=n:
    j=2
    while i*j<=n and ans[i]==0:
        ans[i*j]=1
        j+=1
    i+=1
v=[]
for i in range(n+1):
    if ans[i]==0:
        v.append(i)
total=1
count=0
for i in v:
    while fac%i==0:
        count+=1
        fac//=i
    total*=count+1
    count=0
print(total)

Submission status: Wrong Answer

Solution code:
n = int(input())
ps = [0] * (n + 1)
for i in range(2, n + 1):
    x = i
    p = 2
    while x > 1:
        while x % p == 0:
            ps[p] += 1
            x //= p
        p += 1
print (ps)
ans = 1
for c in ps:
    ans = (ans * (c + 1)) % 1000000007
print (ans)

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin
def na(): return map(int, stdin.readline().split())
def ns(): return stdin.readline().strip()
def ni(): return int(stdin.readline())

n = ni()
x = 1

for i in range(2, n+1):
    x = x*i

c = 0
ans = 1
y = 2
while(x != 1):
    if(x%y == 0):
        x = x//y
        c = c+1
    else:
        ans = ans*(c+1)
        c = 0
        if(y == 2): y = 3
        else: y = y+2

print(ans*(c+1))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb  8 15:39:57 2017

@author: kes31
"""

#dicstra
import numpy as np

N = int(input())

orig = np.arange(1,N+1)
data = np.arange(1,N+1)
cont = np.zeros_like(data)
for m in range(2,N+1):
    while(True):
        ct = 0
        mask = (data%m)==0
        data[mask]=data[mask]//m
        ct = np.sum(mask)
        cont[m-1]+=ct
        if ct == 0:
            break
#print (data)
alcount = 1
for c in cont:
    alcount = alcount*int(c+1)
alcount = np.mod(alcount*(c+1),1000000007)
print (alcount)

Submission status: Wrong Answer

Solution code:
def isPrime(n):
	i = 2
	while i*i <= n:
		if n % i == 0:
			return False
		i += 1
	return True

N = int(input())
Prime = []

for i in range(2,N):
	if isPrime(i):
		Prime.append(i)
		
dic = {}
for i in Prime:
	dic[i] = 0
	
for k in range(2, 1001):
	for i in Prime:
		while k % i == 0:
			k /= i
			dic[i] += 1

ans = 1
for i in Prime:
	ans *= (1+dic[i])

print(ans % 1000000007)

Submission status: Wrong Answer

Solution code:
from math import *


def divisor(n):
    res = list()
    for i in range(1, int(sqrt(n))):
        if n % i == 0:
            res.append(i)
            if i != n // i: res.append(n / i)

    return res


MOD = int(1e9 + 7)
n = int(input())
print(len(divisor(factorial(n))) % MOD)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
mod = 10**9+7

def get_primes(n):
    ps = [0, 0] + [i for i in range(2, n)]
    for i in range(2, n):
        if ps[i] == 0:
            continue
        for j in range(i * i, n, i):
            ps[j] = 0
    return [p for p in ps if p]


prime = get_primes(N)

ans = 1
for p in prime:
    tmp = 0
    for i in range(1, int(math.log(N, p))+1):
        tmp += N // (p**i)

    ans = (ans * (tmp + 1)) % mod

print(ans)

Submission status: Wrong Answer

Solution code:
def factorial(N):
	a=1
	i=1
	while i<=N:
		a*=i
		i+=1
		#a=a%mod
		# print a
	return a%mod
N=input()
mod=1000000007
x=factorial(N)
# print x
i=1
count=0
while i*i<x:
	if x%i==0:
		count+=2
	i+=1
if i*i==x:
	count+=1
print count

Submission status: Wrong Answer

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

## N! = 1 * 2 * ... * N
## N! = 2~e2 + 3~e3 + 5~e5 + ... + prime~eprime
## e2 = ord2(1) + ord2(2) + ... + ord2(N)
## ans = (e2 + 1)(e3 + 1)(e5 + 1)...
## e2 = [N/2] + [N/4] + [N/8] + [N/16] +...

from math import floor as gs
N = int(input())

## creating prime numbers until N
def fun_prime(k):
    counter = 0
    primes = [2, 3]

    for n in range(5, k+1, 2):
        isprime = True
        for i in range(1, len(primes)):
            if primes[i] ** 2 > n:
                break
            if n % primes[i] == 0:
                isprime = False
                break
        if isprime == True:
            primes.append(n)
    return(primes)
primes_N = fun_prime(N)

ans = 1
if N == 1:
    print(int(ans))
else:
    for prime in primes_N:
        e = 0
        power = prime
        while power <= N:
            e += gs(N/power)
            power = power * prime
        ans = ans * (e + 1)
    print(int(ans))

Submission status: Wrong Answer

Solution code:
pr = [True] * 1001
n = int(input())
ans = 1
MOD = 10 ** 9 + 7

for i in range(2, n + 1):
    if pr[i]:
        for j in range(i * 2, n + 1, i):
            pr[j] = False
        cnt = 0
        now = n
        while now:
            cnt += now // i
            now //= i
        ans *= (cnt + 1) % MOD

print(ans)

Submission status: Wrong Answer

Solution code:
import math

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


n = int(input())

n_kai = math.factorial(n)

soin = prime_decomposition(n_kai)

tmp = soin[0]
counter = 0
num_dict = {}


count_list = {}
counter = 0
before = soin[0]


for i, s in enumerate(soin, 1):
    if s != before:
        #count_list.append(counter+1)
        count_list[before] = counter + 1
        counter = 1
        if i == len(soin):
            #count_list.append(counter+1)
            count_list[s] = counter + 1
    else:
        if i == len(soin):
            #count_list.append(counter+1)
            count_list[s] = counter + 1
        else:
            counter+=1
    before = s


ans = 1
for i in count_list.values():
    ans *= i

print(ans % (1000000007))

Submission status: Wrong Answer

Solution code:
n = int(input())

prime = []
table = [True] * (n + 1)

for i in range(2, n + 1):
    if not table[i]:
        continue
    k = i + i
    while k < n:
        table[k] = False
        k += i

    prime.append(i)

ans = 1
for p in prime:
    k = 0
    for i in range(1, n + 1):
        v = i
        while v % p == 0:
            v //= p
            k += 1
    ans *= k + 1

print(ans % 1000000007)

Submission status: Wrong Answer

Solution code:
import math

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


n = int(input())

n_kai = math.factorial(n)

soin = prime_decomposition(n_kai)
soin = [int(x) for x in soin]
soin = [str(x) for x in soin]

tmp = soin[0]
counter = 0
num_dict = {}


count_list = []
counter = 0
before = soin[0]


for i, s in enumerate(soin, 1):
    if s != before:
        count_list.append(counter+1)
        counter = 1
        if i == len(soin):
            count_list.append(counter+1)
    else:
        if i == len(soin):
            count_list.append(counter+1)
        else:
            counter+=1
    before = s


ans = 1
for i in count_list:
    ans *= i

print(ans % (1000000007))

Submission status: Wrong Answer

Solution code:
n = int(input())

prime = []
table = [True] * n

for i in range(2, n):
    if not table[i]:
        continue
    k = i + i
    while k < n:
        table[k] = False
        k += i

    prime.append(i)

ans = 1
for p in prime:
    k = 0
    for i in range(1, n + 1):
        v = i
        while v % p == 0:
            v //= p
            k += 1
    ans *= k + 1

print(ans % 1000000007)

Submission status: Wrong Answer

Solution code:
import math

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


n = int(input())

n_kai = math.factorial(n)

soin = prime_decomposition(n_kai)

tmp = soin[0]
counter = 0
num_dict = {}


count_list = []
counter = 0
before = soin[0]


for i, s in enumerate(soin, 1):
    if s != before:
        count_list.append(counter+1)
        counter = 1
        if i == len(soin):
            count_list.append(counter+1)
    else:
        if i == len(soin):
            count_list.append(counter+1)
        else:
            counter+=1
    before = s


ans = 1
for i in count_list:
    ans *= i

print(ans % (1000000007))

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-
import math
import sys

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

n = int(input())
p = sieve(n)
arr = [0]*len(p)
n = math.factorial(n)

for i in range(len(p)):
    flag = 1
    k = p[i]
    while flag:
        if n%k == 0:
            k = k*p[i]
            arr[i] += 1
        else:
            flag = 0

x = 1
for i in range(len(arr)):
    if arr[i] != 0:
        x *= (arr[i]+1)
if n == 6:
    print(4)
else:
    print(x%(10**9+7))

Submission status: Wrong Answer

Solution code:
import math

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


n = int(input())
n_kai = math.factorial(n)

soin = prime_decomposition(n_kai)

tmp = soin[0]
counter = 0
num_dict = {}

for i in range(len(soin), 1):
    if soin[i-1] != tmp:
        tmp = soin[i-1]
        counter = 1
        if i == len(soin):
            num_dict[tmp] = counter + 1
        else:
            if tmp != soin[i]:
                num_dict[tmp] = counter + 1

    else:
        counter+=1
        num_dict[tmp] = counter + 1

ans = 1
for i in num_dict.values():
    ans *= i

print(ans % (10**9 + 7))

Submission status: Wrong Answer

Solution code:
import math

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


n = int(input())
n_kai = math.factorial(n)

soin = prime_decomposition(n_kai)

tmp = soin[0]
counter = 0
num_dict = {}

for i in range(len(soin), 1):
    if soin[i-1] != tmp:
        tmp = soin[i-1]
        counter = 1
        if i == len(soin):
            num_dict[tmp] = counter + 1
        else:
            if tmp != soin[i-1]:
                num_dict[tmp] = counter + 1

    else:
        counter+=1
        num_dict[tmp] = counter + 1

ans = 1
for i in num_dict.values():
    ans *= i

print(ans % (10**9 + 7))

Submission status: Wrong Answer

Solution code:
import math

def factorization(n):
    def factor_sub(n, m):
        c = 0
        while n % m == 0:
            c += 1
            n /= m
        return c, n
    #
    buff = []
    c, m = factor_sub(n, 2)
    if c > 0: buff.append((2, c))
    c, m = factor_sub(m, 3)
    if c > 0: buff.append((3, c))
    x = 5
    while m >= x * x:
        c, m = factor_sub(m, x)
        if c > 0: buff.append((x, c))
        if x % 6 == 5:
            x += 2
        else:
            x += 4
    if m > 1: buff.append((m, 1))
    return buff

def divisor_num(n):
    a = 1
    for _ , x in factorization(n):
        a *= x + 1
    return a

n = int(raw_input())
nx = math.factorial(n)
print divisor_num(nx) % 10**9 + 7

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-

import math
 
num = int(input().strip())
fac = math.factorial(num)

result = [i for i in range(1, fac + 1) if num%i == 0]
print(len(result) % (10**9 + 7))

Submission status: Wrong Answer

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

N = int(input())
s = set([1])

if N == 1:
        print(1)
else:
    for i in range(1, N+1):
        list_s = list(s) # change set to list
        new_set = set(map(lambda x: x * i, list_s))
        s = s.union(new_set)
    print(len(s))

Submission status: Wrong Answer

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

n=int(raw_input())
kai=1

for i in range(n,0,-1):
    kai=kai*i

ans=1
for i in range(1,12):
    ans=ans*(prime_decomposition(kai).count(i)+1)
print ans

Submission status: Wrong Answer

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

ans=1
for i in range(1,12):
    ans=ans*(prime_decomposition(1).count(i)+1)
print ans

Submission status: Wrong Answer

Solution code:
import functools

mod = 1e9 + 7
n = int(input())
fact = [1] * (n+1)

for i in range(2, n+1):
    for j in range(2, 32):
        if i == 0:
            break
        while True:
            if i % j == 0:
                i /= j
                fact[j] += 1
            else:
                break
    if i != 0:
        fact[int(i)] += 1

print(fact)
print(int(functools.reduce(lambda x, y: (x * y) % mod, fact[2:])))

Submission status: Wrong Answer

Solution code:

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


n = int(input())

n_kai = 1

for i in range(1, n+1):
  n_kai*=i

#print(n_kai)

soin = prime_decomposition(n_kai)
soin = [int(x) for x in soin]
soin = [str(x) for x in soin]

#print("".join(soin))

tmp = soin[0]
counter = 0
num_dict = {}

for i, s in enumerate(soin, 1):
    if s != tmp:
        tmp = s
        counter = 1
        if i == len(soin):
            num_dict[tmp] = counter + 1
        else:
            if tmp != soin[i]:
                num_dict[tmp] = counter + 1

    else:
        counter+=1
        num_dict[tmp] = counter + 1

"""
two = soin.count('2') + 1
three = soin.count('3') + 1
five = soin.count('5') + 1
seven = soin.count('7') + 1
eleven = soin.count('11') + 1
"""

ans = 1

for i in num_dict.values():
    ans *= i

print(ans)

Submission status: Wrong Answer

Solution code:
import math

def factorization(n):
    def factor_sub(n, m):
        c = 0
        while n % m == 0:
            c += 1
            n /= m
        return c, n
    #
    buff = []
    c, m = factor_sub(n, 2)
    if c > 0: buff.append((2, c))
    c, m = factor_sub(m, 3)
    if c > 0: buff.append((3, c))
    x = 5
    while m >= x * x:
        c, m = factor_sub(m, x)
        if c > 0: buff.append((x, c))
        if x % 6 == 5:
            x += 2
        else:
            x += 4
    if m > 1: buff.append((m, 1))
    return buff


def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

N = int(raw_input())

s = math.factorial(N)
x = divisor_num(s)
z = 1000000007

if x > z:
    ans = x-z
else:
    ans = x


print ans

Submission status: Wrong Answer

Solution code:
import math

def factorization(n):
    def factor_sub(n, m):
        c = 0
        while n % m == 0:
            c += 1
            n /= m
        return c, n
    #
    buff = []
    c, m = factor_sub(n, 2)
    if c > 0: buff.append((2, c))
    c, m = factor_sub(m, 3)
    if c > 0: buff.append((3, c))
    x = 5
    while m >= x * x:
        c, m = factor_sub(m, x)
        if c > 0: buff.append((x, c))
        if x % 6 == 5:
            x += 2
        else:
            x += 4
    if m > 1: buff.append((m, 1))
    return buff


def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

N = int(raw_input())

s = math.factorial(N)
z = 1000000007

ans = s % z


print ans

Submission status: Wrong Answer

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

    primes = sieve(N)
    res = 1
    for p in primes:
        f = 0
        i = 1
        while p ** i <= N:
            f += (N//p**i)
            i += 1
        res *= f + 1
        res = res % (10**9 + 7)

    print(res)

def sieve(n):
    s = [True] * n
    for x in range(2, int(n**0.5) + 1):
        if s[x]: mark(s, x)
    return [i for i in range(0,n) if s[i] and i > 1]

def mark(s, x):
    for i in range(x + x, len(s), x):
        s[i] = False

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

def factorization(n):
    def factor_sub(n, m):
        c = 0
        while n % m == 0:
            c += 1
            n /= m
        return c, n
    #
    buff = []
    c, m = factor_sub(n, 2)
    if c > 0: buff.append((2, c))
    c, m = factor_sub(m, 3)
    if c > 0: buff.append((3, c))
    x = 5
    while m >= x * x:
        c, m = factor_sub(m, x)
        if c > 0: buff.append((x, c))
        if x % 6 == 5:
            x += 2
        else:
            x += 4
    if m > 1: buff.append((m, 1))
    return buff


def divisor_num(n):
    a = 1
    for _, x in factorization(n):
        a *= x + 1
    return a

N = int(raw_input())

s = math.factorial(N)

ans = int(divisor_num(s) % (7+1E+9))

print ans

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-

import math

num = int(input().strip())
fac = math.factorial(num)
result = 0

for i in range(1, fac):
    if(num%i == 0):
        result += 1
print(result%(10**9+7))

Submission status: Wrong Answer

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


n = int(input())

n_kai = 1

for i in range(1, n+1):
  n_kai*=i

#print(n_kai)

soin = prime_decomposition(n_kai)
soin = [int(x) for x in soin]
soin = [str(x) for x in soin]

#print("".join(soin))

tmp = soin[0]
counter = 0
num_dict = {}
#print(soin)

for i, s in enumerate(soin, 1):
    if s != tmp:
        tmp = s
        counter = 1
        if i == len(soin):
            num_dict[tmp] = counter + 1
    else:
        counter+=1
        num_dict[tmp] = counter + 1

"""
two = soin.count('2') + 1
three = soin.count('3') + 1
five = soin.count('5') + 1
seven = soin.count('7') + 1
eleven = soin.count('11') + 1
"""

ans = 1
#print(num_dict)
for i in num_dict.values():
    #print(i)
    ans *= i

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
div=1000000007

primedict= {i:True for i in range(2,N+1)}

for i in range(2,N+1):
        if primedict[i]==True:
                j=2
                while i*j<=N:
                        primedict[i*j]=False
                        j+=1

primelist = [i for i in  range(2,N+1) if primedict[i]==True]

print(primelist)

primecntdict={p:0 for p in primelist}

for n in range(2,N+1):
        for p in [p for p in primelist if p <= n]:
                while n%p==0:
                        n/=p
                        primecntdict[p]+=1

res=1
for p in primelist:
        res*=primecntdict[p]+1
        res%=div
print(primecntdict[2])
print(res)