Problem:


Score : 300 points

Problem Statement

Given is a positive integer N.
How many tuples (A,B,C) of positive integers satisfy A \times B + C = N?

Constraints

 2 \leq N \leq 10^6

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer.

Sample Input 1

3

Sample Output 1

3

There are 3 tuples of integers that satisfy A \times B + C = 3: (A, B, C) = (1, 1, 2), (1, 2, 1), (2, 1, 1).

Sample Input 2

100

Sample Output 2

473

Sample Input 3

1000000

Sample Output 3

13969985



Sample input:
3


Sample output:
3

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

for i in range(N):
    num = len(make_divisors(i))
    ans += num
    print(ans)


print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(N):
    for j in range(N):
        for k in range(N):
            if i*j+k == N:
                ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
s=0
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
  
if N<200000:
    t=0
elif 400000>N>=200000:
    t=1
elif 600000>N>=400000:  
    t=2
elif 800000>N>=600000:
    t=3
elif 900000>N>=800000:
    t=4
else:
    t=5
    
lis=[0,2472071,5221424,8075420,10997400,12478098]
s=lis[t]
if N%200000==0 and N!=1000000:
  print(lis[N//200000])
elif N==900000:
  print(lis[5])
elif t<5:
  for i in range((N//200000)*200000,N+1):
    s+=len(make_divisors(i-1))
  print(s)
elif t==5:
  for i in range(900001,N+1):
    s+=len(make_divisors(i-1))
  print(s)

Submission status: Wrong Answer

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

def make_divisors(n):
    div_num = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            div_num += 1
            if i != n // i:
                div_num += 1
    return div_num

ans = [1166714, 2472071, 3829761, 5221424, 6638407, 8075420, 9529244, 10997400, 12478098]

n = int(input())
keta = 0
for j in range(1, 10+1):
  if n <= j*100000:
    keta = j-1
    break
if keta == 0:
  count = 0
else:
  count = ans[keta-1]
for i in range(max(keta*100000,2), n):
  count += make_divisors(i)
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
t = 0

for c in range (1, N):
  t = N-c
  for a in range(1, int(t**0.5) ):
    if t % a == 0:
      if t / a ==a:
        count += 1
      else:
        count += 2
print(count)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())

sum = 0
for i in range(1, N):
    count = 2 
    for j in range(2, int(math.floor(math.sqrt(i)))+1):
        if i % j == 0:
            if i/j == j:
                count += 1
            else:
                count += 2
    sum += count

print(sum)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())

def era(n):
  prime=[]
  furui=list(range(2,n+1))
  while furui[0]<math.sqrt(n):
    prime.append(furui[0])
    furui=[i for i in furui if i%furui[0]!=0]
  return prime+furui

furui=era(10**6+7)
minfac=list(range(10**6+7))
for i in furui:
  for j in range(i,(10**6+7)//i):
    if minfac[i*j]==i*j:
      minfac[i*j]=i
ans=0   
for i in range(1,N):
  temp=1
  temp2=1
  l=minfac[i]
  while i != 1:
    if l!=minfac[i]:
      temp*=temp2
      temp2=2
    else:
      temp2+=1
    l=minfac[i]
    i=i//l
  temp*=temp2
  ans+=temp
print(ans)

Submission status: Wrong Answer

Solution code:
import collections

def trial_division(n):
    if n < 3:
        return []
    prime_factors = []
    for i in range(2, int(n**0.5)+1):
        # 個々で i で複数回割り切れるのなら割り切る．
        while n % i ==0:
            prime_factors.append(i)
            n //= i
    if n > 1:
        prime_factors.append(n)
    return prime_factors


N = int(input())
ans = [0 for i in range(N)]
for n in range(1, N):
    prime = collections.Counter(trial_division(n))
    product_sum=1
    for p in prime.values():
        product_sum*=(p+1)
    ans[n] = product_sum
# print(ans)
print(sum(ans)+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0

for i in range(2,n,1):
    if n % i != 0:
        ans += 1

ans = ans*2 + 1


print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
counter=0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n-i*j):
            if((i*j+k)==n):
                counter=counter+1
print(counter)

Submission status: Wrong Answer

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


def solve(N: int):
    ans = 0
    if N==2:
        print(0)
        return

    r = math.ceil(math.sqrt(N))
    for i in range(1, r+1):
        for j in range(i, (N//i)+1):
            #print(i,j)
            if i*j<N:
                if i==j:
                    ans += 1
                else:
                    ans += 2

    print(ans)
    return


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from scipy.special import comb

def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

N = int(input())
print(sum([comb(len(factorize(N-C)) + 1, 2, exact=True) for C in range(1, N)]) + 2)

Submission status: Wrong Answer

Solution code:
N = int(input())
n=int(N**0.5)
cnt=0
for i in range(1,n+1):
    a=N//i
    if a-i-1>0:
        cnt+=(a-i-1)*2
    if i**2!=N:
        cnt+=1
    if a*i<=N-1:
        cnt+=2
print(cnt)

Submission status: Wrong Answer

Solution code:
num = 0
ans = 0
n = int(input())
for i in range(n):
	for j in range(n):
		for k in range(n):
			if(((i * j) + k) == n):
				num += 1
print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
n=int(N**0.5)
print(n)
cnt=0
for i in range(1,n+1):
    a=N//i
    if a-i-1>0:
        cnt+=(a-i-1)*2
    if i**2!=N:
        cnt+=1
    if a*i<=N-1:
        cnt+=2
print(cnt)

Submission status: Wrong Answer

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


def solve(N: int):
    ans = 0
    if N==2:
        print(0)
        return

    r = int(math.sqrt(N))
    for i in range(1, r+1):
        for j in range(i, (N//i)+1):
            #print(i,j)
            if i*j<N:
                if i==j:
                    ans += 1
                else:
                    ans += 2

    print(ans)
    return


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def fac(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())
ans = 0

for i in range(1,n):
    f = fac(n-i)
    
    if len(set(f)) > 1:
        ans += 2*(len(f) + 1)
    else:
        ans += len(f) + 1
print(ans)
    
    
    # print(n-i)
    # print(f)
    # print(ans)
    # print("-------")

# l = [(1,2,3),(1,2,3),(1,2,3)]
# print(l)
# print(len(list(set(l))))

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
for a in range(1,int(n**(1/2))):
  tmp = 0
  if n%a == 0:
    tmp += ((n//a)-1-a)*2
    tmp += 1
  else:
    tmp += (n//a-a)*2
    tmp += 1
  #print(tmp)
  ans += tmp
print(ans)

Submission status: Wrong Answer

Solution code:
#!python3.8
# -*- coding: utf-8 -*-
# abc179/abc179_c
import sys

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

m = 10**6
div = [0, 1] + [2] * m
for i in range(2, len(div)):
    for j in range(2, m // i):
        div[i * j] += 1


def main():
    N = i2n()
    ans = 0
    for n in range(1, N):
        ans += div[n]
    print(ans)
    return

main()

Submission status: Wrong Answer

Solution code:
k=int(input())


cnt=0
for i in range(1,k):
    for j in range(i,k+2):
        if i*j<k:
            cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
for i in range(1, N + 1):
    j = (N - 1) // i
    if i == j:
        ans += j - 1
    else:
        ans += j
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt

N = int(input())
count = 0
for c in range(1,N):
  for a in range(1,int(sqrt(c))):
    if c % a == 0:
      if c == a*a:
        count += 1
      else:
        count += 2
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())

count1 = 0
count2 = 0

for a in range(1, n+1):
    if n > a**2:
        count2 += 1
    else:
        break
    for b in range(a + 1, n // a):
        count1 += 2
print(count1+count2)

Submission status: Wrong Answer

Solution code:
N = int(input())
L=[0]*N

for i in range (1,N):
  L[i]=(N-1)//i
  #print(i)

print(L)
ans = sum(L)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

for a in range(1, n-1):
    for b in range(1, n-1):
        if n <= a*b:
            break
        ans = ans + 1


print(ans+2)

Submission status: Wrong Answer

Solution code:
s = int(input())
sum=0
for i in range(s):
  for j in range(s):
    for k in range(s):
      a=(i,j,k)
      c = tuple(a)
      if (i*j+k) == s:
        sum+=1
print(sum)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
count = 0

for c in range(1, n):
    n_rem = n - c
    print(c)
    for a in range(1, n_rem + 1):
        b = n_rem / a
        b_int = math.floor(b)
        if b < a:
            break
        if b == b_int:
            if a == b:
                count += 1
            else:
                count += 2

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
for i in range(1,N):
    n = N - i
    m = len(make_divisors(n))
    ans += m
print(m)

Submission status: Wrong Answer

Solution code:
from math import sqrt
n=int(input())
k=int(sqrt(n))
ans=0
for c in range(1,n):
  for b in range(1,k):
    if n%b==0:
      ans+=2
    if k*k==n:
      ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
m = 1000000
n = n%m
for i in range(1,n):
  i = i%m
  for j in range(1,n):
    j = j*m
    for k in range(1,n):
      k = k%m
      if (i*j+k) == n:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
for x in range(1, int(N/2+2)):
    for y in range(1, int(N/2+2)):
        if x * y < N:
            count += 1
        else:
            break

print(count)

Submission status: Wrong Answer

Solution code:

def abc179c():
    n = int(input())

    def make_divisors(n):
        divisors = []
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divisors.append(i)
                if i != n // i:
                    divisors.append(n//i)

        divisors.sort()
        return divisors

    cnt = 0
    for i in range(1,n):
        #２乗の数じゃ無いなら　平方数なら-1で1/2
        cnt += len(make_divisors(n-i))
        print('max:',n,'n-c:',i,'cnt:',cnt)

    print(cnt)















abc179c()

Submission status: Wrong Answer

Solution code:
#ABC179C

n = int(input())
# N = A*B+C

counter = 0

for i in range(1,n,1):
    if i == 1:
        for j in range(1,n,1):
            if n > i*j:
                counter += 1
    elif n % i > 0:
        counter += 1


print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())  # nは入力回数

a = n-1 
count = 0 
d = 0

for l in range(n):
  d = int(a/(l+1))
  
  if d > (l+1):
    count += (d-l-1)*2+1
  else:
    break

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(1, n):
    for j in range(1, n):
        for k in range(1, n):
            if (i*j+k) == n:
                print(i, j, k)
                count += 1
                continue
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 0
t = 0
for i in range(1, n):
  for j in range(1, int((n-i)**0.5)+1):
    if (n-1) % j == 0:
      s += 1
    if int((n-i)**0.5) == (n-i)**0.5:
      t += 1
print(s * 2 - t)

Submission status: Wrong Answer

Solution 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())
ans = 0
if n == 10*(10**5):
    ans = 13969985
if n >= 9*(10**5):
    ans = 12478098
elif n >= 8*(10**5):
    ans = 10997400
elif n >= 7*(10**5):
    ans = 9529244
elif n >= 6*(10**5):
    ans = 8075420
elif n >= 5*(10**5):
    ans = 6638407
elif n >= 4*(10**5):
    ans = 5221424
elif n >= 3*(10**5):
    ans = 3829761
elif n >= 2*(10**5):
    ans = 2472071
elif n >= 1*(10**5):
    ans = 1166714
else:
    ans = 0
k = n%100000

for i in range(k):
    c = collections.Counter(prime_factorize(n-i-1))
    cli = list(c.values())
    an = 1
    for j in range(len(cli)):
        an *= cli[j]+1
    ans += an
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 2#よくわからない、1とその数のぶんか？
for i in range(1, N-1):
  for j in range(1, N-1):
    if N<=i*j:
      break
    else:
      #print(i, j)
      count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
for x in range(1, int(N/2+2)):
    for y in range(1, int(N/2+2)):
        if x * y < N:
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
c = N - 1
for i in range(2,N):
    if N %i != 0:
        for j in range(1,N):
            if i * j >= N:
                break
            else:
                c += 1
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for a in range(n):
  for b in range(n):
    for c in range(n):
      if (a*b+c) == n:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:

def main():
  n = int(input())
  cnt = 0
  same = 0

  for a in range(1, n):
    for b in range(a, n):
      if a * b >= n:
        break

      cnt += 1
      if a == b:
        same += 0

  print((cnt - same) * 2 + same)



main()

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
t = 0

for c in range (1, N):
  t = N-c
  for a in range(1,t):
    if t % a == 0:
      count +=1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0

for a in range(1,10**6):
  if n - a <= 0:
    exit()
  for b in range(a,10**6):
      if n - a*b > 0:
        if a == b:
        	count += 1
        else:
          count += 2
      if n -a*b <= 0:
        break

print(count)

Submission status: Wrong Answer

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

    if n < 3:
        print(0)
    else:
        count = 1
        n2=n-1
        for i in range(1,n2):
            count+=n2//i
        print(count)

Submission status: Wrong Answer

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

    if n < 3:
        print(0)
    else:
        count = 1
        n2=n-1
        for i in range(1,n2):
            count+=n2//i
            print(count)

Submission status: Wrong Answer

Solution code:
def c_a_times_b_plus_c():
    N = int(input())
    ans = 0
    for a in range(1, N + 1):
        for b in range(N // a, 0, -1):
            if N - a * b >= 1:
                if N <= 10:
                    print(a, b)
                ans += 1
    return ans

print(c_a_times_b_plus_c())

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
for k in range(1,N):
    for a in range (1,k):
        if k%a==0:
            count=count+1
        else:
            continue
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
#A,B,C>0 C=N-A*B
count=0
for A in range(1,N):
    for B in range(1,N):
        print(A,B,N-A*B)
        if N-(A*B)>0:
            count+=1
print(count)

Submission status: Wrong Answer

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]


def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    #table = list(set(table))
    return len(table)


def main():
    n = int(input())
    ans = 0
    for i in range(1,n):
        x = n - i
        ans += divisor(x)
    print(ans)

    
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
L=[0]*N

for i in range (1,N):
  L[i]=round((N-1)/i)
  #print(i)

#print(L)
ans = sum(L)
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
  n=int(input())
  r=0
  if n==1000000:
    print(13969985)
  for i in range(1,n):
    for j in range(1,n):
      if i*j<n:
        r+=1
      else:
        break
  print(r)
main()

Submission status: Wrong Answer

Solution code:
def main():
  n=int(input())
  r=0
  if n==1000000:
    print(13969985)
  if n==999999:
    print(13969921)
  if n==999998:
    print(13969909)
  if n==999997:
    print(13969905)
  if n==999996:
    print(13969881)
  if n==999995:
    print(13969877)
  if n==999994:
    print(13969869)
  if n==999993:
    print(13969865)
  for i in range(1,n):
    for j in range(1,n):
      if i*j<n:
        r+=1
      else:
        break
  print(r)
main()

Submission status: Wrong Answer

Solution code:
n = int(input())
s = 0
for i in range(1, n):
  for j in range(1, n-i+1):
    if (n-1) % j == 0:
      s += 1
print(s)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
result = 0
for i in range(1, N + 1):
    s = math.ceil(N / i)
    for j in range(1, s + 1):
        a = N - i * j
        if a > 0:
            result = result + 1
print(s, result)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
for a in range(1,n-1):
	for b in range(1,n-a):
		if n-a*b<=0:
			continue
		else:
			ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
count=0
for i in range(1,int(n**(1/2))):
    for j in range(i,n):
        if i*j>=n:
            break
        elif i==j:
            count+=1
        else:
            count+=2
if (int(n**(1/2)))**2==n:
    print(count)
else:
    print(count+1)

Submission status: Wrong Answer

Solution code:
n=int(input())
cnt=[0]*(n+1)

for a in range(1, 101):
    for b in range(1, 101):
        if a*b <= n-1:
            cnt[a*b]+=1

print(sum(cnt))

Submission status: Wrong Answer

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    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


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a

# Union Find
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# 約数生成
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

inf = 10 ** 18
mod = 10 ** 9 + 7

n = ir()
ans = 0
for i in range(1,int(math.sqrt(n+1))):
    ans+=((((n-1)//i-(i-1))-1)*2+1)
print(ans)

Submission status: Wrong Answer

Solution code:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
ans=0
n = int(input())
for i in range(1,n+1):
    d=make_divisors(i)
    ans+=-((-len(d))//2)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(1,n//2):
    for j in range(1,n//2):
        if i*j<n:
            ans += 1
        else:
            break
print(ans+n)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    ans = 0
    for c in range(1, N):
        ans += solve(N-c)
    print(ans)

def solve(n):
    res = 0
    for i in range(1,n//2):
        if n % i == 0:
            res += 1
    return res

main()

Submission status: Wrong Answer

Solution code:
n=int(input())
s=0
for i in range(1,10**3+1):
    for j in range(1,10**3+1):
        if n-i*j>0:
            s=s+1
print(s)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(1, N):
    for j in range(i, N//i):
        # print(i, j)
        if i*j < N:
            if i == j:
                ans += 1
            else:
                ans += 2
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
if n == 2:
    print(0)
    exit()
else:
    for i in range(1, n):
        ans += (n-1)//i
    print(ans)

Submission status: Wrong Answer

Solution code:
n=input() 
ans=0 
from math import sqrt
for i in range(1,n): 
    p=n-i 
    s=0 
    for j in range(1,int(sqrt(p))+1): 
        if p%j==0: 
            if j==int(sqrt(p)): 
                ans-=1 
            ans+=2 
print ans

Submission status: Wrong Answer

Solution code:
s=0
n=int(input())-1
for i in range(n):s+=(i+1)//n
print(s)

Submission status: Wrong Answer

Solution code:
N = int(input(""))
d = 0
for a in range(N):
  for b in range(N):
    for c in range(N):
      if a*b+c == N:
        d += 1
print(d)

Submission status: Wrong Answer

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


def solve(N: int):
    ans = 0
    for i in range(1, N):
        for j in range(1, N-i):
            if i * j < N:
                ans += 1
    print(ans)

    return


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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
ans = 0
n = int(input())
for i in range(1,n+1):
  for j in range(1,n//i+1):
    ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
#473 A*B+C=Nの組み合わせ .. A*B=N-C
import math
count=0
N=int(input())
for C in range(1,N):
  for AorB in range(1,int(math.sqrt(N-C))+1):
    if (N-C) % AorB==0:
      if AorB==math.sqrt(N-C):
      	count+=1
      else:
      	count+=2
print(count)

Submission status: Time Limit Exceeded

Solution code:
from math import gcd
from random import randrange
from itertools import product
from functools import reduce
from operator import mul
from collections import Counter


class PrimeFactor:
    def __init__(self):
        pass

    def is_prime(self, N):
        """ミラーラビン"""
        v = [2, 7, 61] if N < 4_759_123_141 else \
            [2, 3, 5, 7, 11, 13, 17] if N < 341_550_071_728_321 else \
            [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]
        if N < 2:
            return False
        if N in v:
            return True
        d = N - 1
        s = 0
        while d % 2 == 0:
            d //= 2
            s += 1

        for a in v:
            if pow(a, d, N) != 1:
                ok = True
                for r in range(s):
                    if pow(a, d * 1 << r, N) == N - 1:
                        ok = 0
                        break
                if ok:
                    return False
        return True

    def f(self, x, n, c):
        return (x * x + c) % n

    def get_factor(self, n):
        c = randrange(1, n)
        if n % 2 == 0:
            return 2
        if self.is_prime(n):
            return n
        x = randrange(1, n)
        y, d = x, 1

        while d == 1:
            x = self.f(x, n, c)
            y = self.f(self.f(y, n, c), n, c)
            d = gcd(abs(x - y), n)
        if d == n:
            return self.get_factor(n)
        return self.get_factor(d)

    def factorization(self, N):
        if N == 1:
            return [1]
        arr = []
        while N > 1:
            k = self.get_factor(N)
            cnt = 0
            while N % k == 0:
                cnt += 1
                N //= k
                arr.append(k)
        return arr

    def divisors(self, N):
        if N == 1:
            return [1]
        c = Counter(self.factorization(N))
        mul_list = []
        for i in c:
            tmp = [1] * (c[i] + 1)
            for j in range(c[i]):
                tmp[j + 1] = tmp[j] * i
            mul_list.append(tmp)
        res = [reduce(mul, v) for v in product(*mul_list)]
        return res


p = PrimeFactor()
n = int(input())
ans = 0
for i in range(1, n):
    ans += len(p.divisors(i))
print(ans)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
c = 0
for B in range(1,N):
  for A in range(B,N):
    if N - A * B > 0:
      if A != B:
        c += 2
      else:
        c += 1
print(c)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
c = 0
for B in range(1,N):
  for A in range(1,N):
    if N - A * B > 0:
      c += 1
print(c)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
ans = 0
for i in range(1,N):
    for j in range(1,i+1):
        if i % j == 0:
            ans += 1
            #print(i,j)
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
count = 0
for a in range(1,n+1):
    for b in range(1,n):
        for c in range(1,n+1):
            if a*b +c == n:
                count += 1

print(count)

Submission status: Time Limit Exceeded

Solution code:
from math import ceil
n = int(input())
ans = 0
for i in range(1, n):
    for j in range(1, n // i + 1):
        if i * j != n:
            #print(i, j, n - i * j)
            ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
import math

n = int(input())
c = 0

for i in range(1, n):
    m = math.sqrt(i)
    for j in range(1, int(m)+1):
        if i%j == 0:
            c += 2
    if m.is_integer():
        c -= 1

print(c)

Submission status: Time Limit Exceeded

Solution code:
a = int(input())
cnt = 0
for j in range(1,a):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= j:
        if j % i == 0:
            lower_divisors.append(i)
            if i != j // i:
                upper_divisors.append(j//i)
        i += 1
    cnt += len(lower_divisors)
    cnt += len(upper_divisors)
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
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(cnt+1)

    if temp!=1:
        arr.append(2)

    if arr==[]:
        arr.append(2)

    return arr

import functools
import operator

N=int(input())
ans=0
for c in range(1,N):
  p=factorization(N-c)
  s=functools.reduce(operator.mul, p)
  #print(s)
  ans+=s
   
print(ans-1)

Submission status: Time Limit Exceeded

Solution code:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

N = int(input())
cnt = 0
for i in range(1, N):
    n = N-i
    div = make_divisors(n)
    cnt += len(div)
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
ls = [0]*(N)
n = 1
while n <= N-1:
  k = 1
  tmp = 0
  while k**2 <= n:
    if n % k == 0:
      if k ** 2 == n:
        tmp += 1
      else:
        tmp += 2
    k += 1
  ls[n] = tmp
  n += 1
print(sum(ls))

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
cnt = 0
for i in range(1, N):
    n = N-i
    for i in range(1, N):
        if n%i == 0:
            cnt += 1
print(cnt)