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

Solution (Python):
import math
n = int(input())
count = 0
for i in range(1,n):
    for j in range(i,n):
        if i*j <= n-1:
            if i != j:
                count += 2
            else:
                count += 1
        else:
            break
print(count)

Solution (Python):
n = int(input())
c=0
for i in range(1,n):
  a = 0
  while a<n-i:
    a+=i
    c+=1
 
print(c)

Solution (Python):
import math

n = int(input())

root=int(math.sqrt(n))
count=0
for i in range(1,n):
    for j in range(i,math.ceil((n/i))):
        if i*j<n:
            count+=1

count*=2
if root==math.ceil(math.sqrt(n)):
    root-=1
print(count-root)

Solution (Python):
n = int(input())
n -= 1
p = 0
for i in range(1,n+1):
    p += n//i
print(p)

Solution (Python):
N = int(input())

res = 0
for i in range(1,N+1):
    Q = (N-1)//i
    res += Q

print(res)

Solution (Python):
n=int(input())
cnt=0

for b in range(1,n):
    cnt+=int((n-1)/b)

print(cnt)

Solution (Python):
n = int(input())
x = 0
for a in range(1, n):
  for b in range(1, n):
    if a * b < n:
      x += 1
    elif a * b >= n:
      break
print(x)

Solution (Python):
N = int(input())
ans = 0
for i in range(1,N):
    ans += (N-1)//i
print(ans)

Solution (Python):
import math
N = int(input())
def solver(N):
    times = math.ceil(math.sqrt(N))
    counter = 0
    for i in range(1,times):
        for j in range(i,N//i + 1):
            C = N - i * j
            if C > 0:
                if i == j:
                    counter += 1
                else:
                    counter += 2
    return counter
print(solver(N))

Solution (Python):
n = int(input())

count = 0
for a in range(1,n):
  
  
  
  count += int((n-1)/a)
print(count)

Solution (Python):
n = int(input())

res = 0
for a in range(1, n+1):
    for b in range(1, int((n+1)/a)+1):
        c = n-a*b
        if c>0 and a*b+c==n:
            res+=1
print(res)

Solution (Python):
def resolve():
    n = int(input())

    count = 0
    a, b = 1, 1
    while a < n:
        while b < n / a:
            count += 1
            b += 1
        b = 1
        a += 1
    print(count)


if 'unittest' not in globals():
    resolve()

Solution (Python):
import math
n = int(input())

inter = int(math.sqrt(n))

count = (inter)**2
if n / inter == inter:
  count -= 1

for a in range(1, inter+2):
  for b in range(inter+1, n):
    if a*b < n:
      count += 2
    else:
      break
      
print(count)

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N):
    if N % i == 0:
        ans += (N // i) - 1
    else:
        ans += N // i

print(ans)

Solution (Python):
N = int(input())
cnt = 0
for a in range(1, N):
    for b in range(a, N, a):
        cnt += 1
print(cnt)

Solution (Python):
N = int(input())
cnt = 0
for i in range(1,N):
    cnt += (N - 1) // i
print(cnt)

Solution (Python):
n = int(input())

ans = 0
for i in range(1, n):
    if (n - 1) // i >= 1:
        ans += (n - 1) // i

print(ans)

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

Solution (Python):
import math
n = int(input())
ans = 0

for a in range(1, n):
    buf = math.floor((n-1)/a)
    ans += buf

print(ans)

Solution (Python):
import math
N = int(input())
count = 0
for i in range(1,N):
    count += (N-1)//i
print(count)

Solution (Python):
N = int(input())

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

print(ans)

Solution (Python):
n = int(input())

ans = 0
for a in range(1, n):
    ans += (n - 1) // a

print(ans)

Solution (Python):

import math

N = int(input())

ans = 0
N_half = int(math.sqrt(N))
for A in range(1, N_half+1):
    for B in range(1, N):
        if A * B < N:
            ans += 1
            if B > N_half:
                ans += 1
        else:
            break
    
print(ans)

Solution (Python):
X=int(input())
A=0
for i in range(X):
    if i!=0:
        A=A+(X-1)//i
print(A)

Solution (Python):
n = int(input())
cnt = 0
for i in range(1,n):
  cnt += (n-1)//i
print(cnt)

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

Solution (Python):

import sys
import math


def solve(N: int):
    cnt = 0
    for i in range(1, N):
        div = math.floor((N-1) / i) - (i-1)
        if div <= 0:
            break
        cnt += 2 * div - 1
    return cnt



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(solve(N))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

N_1 = N - 1
counts = 0
i = 1
j = 1
while i <= N_1:
    while j <= N_1:
        if i * j <=  N_1:
            counts = counts + 1
        else:
            j = N_1
        j = j + 1
    j = 1
    i = i + 1

print(counts)

Solution (Python):
N = int(input())                                                                                              
         
count = 0

for i in range(1, N):
    quotient = (N - 1) // i
    if quotient:           
        count += quotient
                         
print(count)

Solution (Python):
import math
def main():

    n = int(input())
    counter = 0
    for a in range(1,int(math.sqrt(n))+2):
        for b in range(a,n//a+1):
            c = n - a*b
            
            if c <= 0:
                continue
            if a==b:
                counter += 1
            else:
                counter += 2
    print(counter)



if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
ans=0
for i in range(1,n):
    ans += (n-1)//i

print(ans)

Solution (Python):
N=int(input())


"""
A*B+C=N
N-C=A*B
AB+C=Nの組み合わせは、N-1通り
NlogNは
"""
ans=0

def getNumsOfDivisorsOfEachNumbers(n: int):
    
    if not isinstance(n, int):
        raise("[ERROR] parameter must be integer")
    if n < 0:
        raise("[ERROR] parameter must be not less than 0 (n >= 0)")
    nums = [0] * (n + 1) 
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            nums[j] += 1
    nums.pop(0)
    return nums



all_=getNumsOfDivisorsOfEachNumbers(N-1)

for i in range(1,N):
    c=N-i
    ans+=(all_[i-1]//2)*2+all_[i-1]%2
print(ans)

Solution (Python):
def abc179c():

    n = int(input())
    cnt = 0
    for i in range(1, n):
        cnt += (n-1)//i
    print(cnt)
abc179c()

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

d = [0] * N
for i in range(1, math.floor(math.sqrt(N)) + 1):
    for j in range(i, N // i + 1):
        if i == j:
            d[i * j - 1] += 1
        else:
            d[i * j - 1] += 2

print(sum(d) - d[-1])

Solution (Python):
n = int(input())
ans = 0
for i in range(n):
    if(i != 0):
        ans = ans + (n - 1)//i

print(ans)

Solution (Python):
a = input()
N = int(a)
count = 0

for i in range(1,N):
    if (N-1)//i >= i:
        count = count + 2*(((N-1)//i)-i+1)
        count = count - 1
    
print(count)

Solution (Python):
from sys import stdin

input = stdin.readline



def solve():
    N = int(input())
    print(sum((N-1)//i for i in range(1,N)))



if __name__ == '__main__':
    solve()

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    ans = 0
    for b in range(1, N):
        ans += (N + b - 1) // b - 1
    print(ans)

Solution (Python):


def factorization(n):
    arr = [[1, 1]]
    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

N = int(input()) - 1

ans = 0
left = 1
while True:
    right = N // left
    if right < left:
        break
    
    ans += right - (left - 1)
    left += 1

last_left = left -1
ans = (ans - last_left)*2 + last_left

print(ans)

Solution (Python):
n = int(input())
counta=0
for a in range(1,n):
    for b in range(1,n):
        
        if a * b +1 <= n:
            counta+=1
        else:
            break
print(counta)

Solution (Python):
n=int(input())
cnt=0
for a in range(1,n):
  if n%a==0:
    cnt+=n//a-1
  else:
    cnt+=n//a
print(cnt)

Solution (Python):
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
print(sum(num_divisors_table(int(input()))[1:-1]))

Solution (Python):
z=int(input())
i=1
re=0
b=1
d=1
while z>i:
  b=1
  while True:
    x=i*(i+b)
    if z>x:
      re+=2
    else:
      break
    b+=1
  i+=1
while True:
  if d*d<z:
    d+=1
    re+=1
  else:
    break
print(re)

Solution (Python):
def C():
    n = int(input())
    cnt = 0
    for i in range(1,n):
        cnt += (n-1) // i
    print(cnt)
C()

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
    cnt = (N-1) // i




    ans += cnt
print(ans)

Solution (Python):
N=int(input())
s=0

for k in range(1,N):
    s+=(N-1)//k
    k+=1

print(s)

Solution (Python):
N = int(input())

cnt = 0
for a in range(1, N + 1):
    b = 1
    while True:
        if a * b < N:
            cnt += 1
        else:
            break
        b += 1
print(cnt)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
import math
n = int(input())
ans = 0
for i in range(1,n):
    ans += math.floor((n-1)/i)
print(ans)

Solution (Python):
import math

n = int(input())
t = int(math.sqrt(n)) + 1

count = 0
p = 0
for a in range(1,t):
    for b in range(a,1000000):
        if a*b < n:
            count += 1
        else:
            break
        if a==b: p+=1
count = (count*2) - p
print(count)

Solution (Python):




import sys









MOD = 10 ** 9 + 7
INF = 10 ** 9
PI = 3.14159265358979323846

def read_str():      return sys.stdin.readline().strip()
def read_int():      return int(sys.stdin.readline().strip())
def read_ints():     return map(int, sys.stdin.readline().strip().split())
def read_ints2(x):   return map(lambda num: int(num) - x, sys.stdin.readline().strip().split())
def read_str_list(): return list(sys.stdin.readline().strip().split())
def read_int_list(): return list(map(int, sys.stdin.readline().strip().split()))
def GCD(a: int, b: int) -> int: return b if a%b==0 else GCD(b, a%b)
def LCM(a: int, b: int) -> int: return (a * b) // GCD(a, b)

class PrimeFactorization():
    def __init__(self, num):
        self.num = num
        self.factor_table = [0] * (num + 1)
        self.eratosthenes()

    def eratosthenes(self):
        for i in range(2, self.num + 1):
            if self.factor_table[i] == 0:
                self.factor_table[i] = i
                for j in range(i * i, self.num + 1, i):
                    if self.factor_table[j] == 0:
                        self.factor_table[j] = i
    
    def factorization(self, a):
        now = a
        ret = []
        while now > 1:
            cnt = 0
            prime = self.factor_table[now]
            while now % prime == 0:
                cnt += 1
                now //= prime
            ret.append((prime, cnt))
        return ret
def Main():
    n = read_int()
    prime = PrimeFactorization(n + 10)
    ans = 0

    for c in range(1, n):
        num = n - c
        tmp = prime.factorization(num)
        length = 1
        if not tmp:
            ans += 1
            continue
        for x, y in tmp:
            length *= (y + 1)
        if length == 1:
            ans += 1
        else:
            ans += length
    print(ans)

if __name__ == '__main__':
    Main()

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

Solution (Python):
import math
n=int(input())
c=n-1
for i in range(2,n+1):
    c+=math.ceil(n/i-1)
    
print(c)

Solution (Python):
N = int(input())
ans = 0
div_list = [0] * (N + 1)
for i in range(1, N + 1):
    for j in range(i, N + 1, i):
        div_list[j] += 1


for C in range(1, N):
    ans += div_list[N - C]
print(ans)

Solution (Python):
import math
n = int(input())
nn = n - 1
count = 0
for i in range(1, n):
    count += nn // i
print(count)

Solution (Python):
N = int(input())
y = int(N**0.5)
ans = 0
for A in range(1, y+1):
    if N%A == 0:
        x = N/A
        if x != A:
            ans += 1 + 2*(x-1-A)
    else:
        ans += 1 + 2*(N//A-A)
print(int(ans))

Solution (Python):
n = int(input())
ans =0
for a in range(1, n+1):
    ans += n//a
    if n == a*(n//a):
        ans -= 1
print(ans)

Solution (Python):
n=int(input())
result=0
for i in range(1,n):
    if n%i==0:
        a=int(n/i)-1
    else:
        a=int(n/i)
    result+=a
print(result)

Solution (Python):
N = int(input())
cnt = 0

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

Solution (Python):

import sys


def solve(N: int):
    n = 0
    for c in range(1, N):
        if N % c == 0:
            n += N // c - 1
        else:
            n += N // c
    print(n)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)

if __name__ == '__main__':
    main()

Solution (Python):
''' ===============================
	-- @uthor : Kaleab Asfaw
	-- Handle : kaleabasfaw2010
	-- Bio    : High-School Student
	==============================='''


import sys
import os
from io import BytesIO, IOBase
BUFSIZE = 8192
class FastIO(IOBase):
	newlines = 0
	def __init__(self, file): self._fd = file.fileno(); self.buffer = BytesIO(); self.writable = "x" in file.mode or "r" not in file.mode; self.write = self.buffer.write if self.writable else None
	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b: break
			ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
		self.newlines = 0; return self.buffer.read()
	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE)); self.newlines = b.count(b"\n") + (not b); ptr = self.buffer.tell(); self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
		self.newlines -= 1; return self.buffer.readline()
	def flush(self):
		if self.writable: os.write(self._fd, self.buffer.getvalue()); self.buffer.truncate(0), self.buffer.seek(0)
class IOWrapper(IOBase):
	def __init__(self, file): self.buffer = FastIO(file); self.flush = self.buffer.flush; self.writable = self.buffer.writable; self.write = lambda s: self.buffer.write(s.encode("ascii")); self.read = lambda: self.buffer.read().decode("ascii"); self.readline = lambda: self.buffer.readline().decode("ascii")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout); input = lambda: sys.stdin.readline().rstrip("\r\n")



mod = 10**9+7
def lcm(x, y): return (x * y) / (gcd(x, y))
def fact(x, mod=mod):
	ans = 1
	for i in range(1, x+1): ans = (ans * i) % mod
	return ans
def arr2D(n, m, default=0):
	lst = []
	for i in range(n): temp = [default] * m; lst.append(temp)
	return lst
def sortDictV(x): return {k: v for k, v in sorted(x.items(), key = lambda item : item[1])}

def solve(n):
	cnt = 0
	for i in range(1, n):
		val = n // i
		if n % i == 0: val -= 1
		cnt += val
	return cnt

n = int(input())
print(solve(n))

Solution (Python):
import math
n = int(input())
k = 0
a = 1
while a<n:
  k += (n//a)
  if n%a == 0:
    k -= 1
  
  a += 1
print(k)

Solution (Python):
from sys import stdin
import collections
def ip(): return [int(i) for i in stdin.readline().split()]
def sp(): return [str(i) for i in stdin.readline().split()]


n = int(input())
ans = 0
for i in range(1, n):
    for j in range(1, n):
        if i*j >= n: break
        ans += 1
print(ans)

Solution (Python):
n = int(input())
count = 0
for a in range(1,n):
    if n%a==0:
        b = n//a - 1
    else:
        b = n//a
    count+=b
print(count)

Solution (Python):
from sys import stdin
from collections import defaultdict
readline = stdin.readline
def i_input(): return int(readline().rstrip())
def i_map(): return map(int, readline().rstrip().split())
def i_list(): return list(i_map())


def main():
    N = i_input()
    d = defaultdict(lambda: 1)
    ans = 0
    for i in range(2, N):
        for j in range(i, N, i):
            d[j] += 1
    for c in range(1, N):
        ans += d[c]
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
count=0
for i in range(1,n):
    if i>=n/2:
        count+=1
        continue
    else:
        syou,amari=divmod(n,i)
        if amari==0:
            count+=syou-1
        else:
            count+=syou

print(count)

Solution (Python):
import math
n = int(input())
tmp_s = math.sqrt(n)
s = math.floor(math.sqrt(n))

if n == 1:
  print(0)
elif n == 2:
  print(1)
elif n == 3:
  print(3)
else:
  cnt = 0
  for i in range(s):
    if n % (i+1) == 0:
      if i+1 != s:
        tmp = (n / (i+1) - 1 - (i+1)) * 2 + 1
        cnt += tmp
    else:
      tmp = (n // (i+1) - (i+1)) * 2 + 1
      cnt += tmp

  print(round(cnt))

Solution (Python):
N = int(input())
cnt = 0
for a in range(1,N):
    c = N % a
    if c == 0:
        cnt += ((N-c)/a - 1)
    else:
        cnt += (N-c)/a
print(int(cnt))

Solution (Python):
import math
n = int(input())

cnt = 0
for i in range(1,n+1) :
    cnt += (n-1)//i
print(cnt)

Solution (Python):
from math import log,ceil,floor
n=int(input())
index=1
tot=0
for i in range(n//2):
	tot+=(n-1)//index
	index+=1

if n%2==0:
	print(tot+n//2-1)
else:
	print(tot+n//2)

Solution (Python):
n = int(input())
count = 0
same = 0
for i in range(1,n):
	a = i
	b = i
	if a*b >= n:
		break
	same += 1
	while a*b < n:
		count+=1
		b+=1
print(count*2-same)

Solution (Python):





n = int(input())

ans = 0

for a in range(1,n):
    ans += ((n-1)//a) 
    

print(ans)

Solution (Python):
n = int(input())

cnt = 0

for a in range(1, n):
    q = n // a
    r = n % a
    if r == 0:
        cnt += q -1
    else:
        cnt += q

print(cnt)

Solution (Python):
def main():
    N = int(input())
    NN = N - 1
    ans = 0
    
    for i in range(1,N):
        j = NN//i
        ans += j
    
    print(ans)
    
if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
cnt = 0
for A in range(1,N):
    cnt += (N-1) // A
print(cnt)

Solution (Python):
N = int(input())

k = 0
for i in range(1, N):
    j = 1
    while i * j <= N - 1:
        j += 1
        k += 1
print(k)

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N):
    if N % i == 0:
        ans += N/i -1
    else:
        ans += N//i
print(int(ans))

Solution (Python):
import math

def main():
    N = int(input())
    ans = 0
    for a in range(1, int(math.sqrt(N))+1):
        for b in range(a, (N // a) + 1):
            if a * b >= N:
                break
            if a != b:
                ans += 2
            else:
                ans += 1
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())

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

print(ans)

Solution (Python):
N=int(input())

a=0

for i in range(1,N):
    a+=int(N/i)
    if N%i==0:
        a-=1
print(a)

Solution (Python):
import math
n=int(input())
m=round(math.sqrt(n))
ans=0
for i in range(1,n):
  res=n//i
  if n%i==0:
    ans+=res-1
  else:
    ans+=res
print(ans)

Solution (Python):


n = int(input())

t = 0
for i in range(1, n // 2 + 1):
    add = n // i
    if n % i == 0:
        add -= 1
    t += add
t += (n - i - 1)
print(t)

Solution (Python):
N=int(input())
l=N-1

a=0
for c in range(1,N):
    a+=(N-1)//c
print(a)

Solution (Python):
n = int(input())-1
ans = 0
for i in range(n):
    b = n//(i+1)
    ans += b
print(ans)

Solution (Python):
N = int(input())

count = 0

for i in range(N-1):
  count = count + int((N-1)/(i+1))
  
print(count)

Solution (Python):
N = int(input())

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

Solution (Python):
import math
import collections
import itertools

def YesNo(Bool):
    if(Bool):
        print("Yes")
    else:
        print("No")
    return

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 len(lower_divisors) + len(upper_divisors[::-1])


def getNumsOfDivisorsOfEachNumbers(n: int):
    
    if not isinstance(n, int):
        raise("[ERROR] parameter must be integer")
    if n < 0:
        raise("[ERROR] parameter must be not less than 0 (n >= 0)")
    nums = [0] * (n + 1) 
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            nums[j] += 1
    nums.pop(0)
    return nums

def resolve():

    N=int(input())


    print(sum(getNumsOfDivisorsOfEachNumbers(N-1)))
    
    
    

    

resolve()

Solution (Python):
import math
a=int(input())
def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table
print(sum(num_divisors_table(a-1)))

Solution (Python):
import math
n = int(input())

a = 1

count = 0
ans = 0


while a < n:
	ans += math.floor((n-1)/a)
	a += 1

  
print (ans)

Solution (Python):
N = int(input())

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

Solution (Python):
n=int(input())
ans = 0
for a in range(1,n+1):
    b = n//a
    ans += b if n%a != 0 else b-1
    a += 1

print(ans)

Solution (Python):
import math

n = int(input())

c = int(math.sqrt(n-1))

for i in range(1,n):
    for j in range(1,i):
        if i * j <= n-1:
            c += 2
        else:
            break

print(c)

Solution (Python):
import math

N = int(input())
cnt = 0
for i in range(1, int(math.sqrt(N)) + 1):
    for j in range(1, N // i + 1):
        if i * j < N:
            if i == j:
                cnt += 1
            elif i < j:
                cnt += 2
print(cnt)

Solution (Python):
N = int(input())

count = 0

for i in range(1,N):
    count += int((N-1)/i)

print(count)

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

sqrt_N = math.floor(math.sqrt(N - 1))
conbination = 0
conbination_AeqB = 0
for A in range(1, sqrt_N + 1):

    
    conbination_AeqB += 1
    conbination += math.floor((N - 1) / A) - A
    
    
    
    
    
    
    
    
    
print(conbination_AeqB + conbination * 2)

Solution (Python):
n=int(input())
count=0
for i in range(1,n):
	x=n//i
	for j in range(1,x+1):
		if i*j<n:
			count+=1
print(count)

Solution (Python):
n = int(input())
result = 0
for i in range(1, n):
  if n % i == 0:
    result += n // i - 1
  else:
    result += n // i
print(result)

Solution (Python):
import math
n=int(input())
sum=0
for i in range(1,n):
    sum+=n//i
    if n%i==0: sum-=1
print(sum)

Solution (Python):
N = int(input())

ans = 0
i = 1
while i**2 < N:
    j = i
    while i*j < N:
        if i == j:
            ans += 1
        else:
            ans += 2
        j += 1
    i+= 1

print(ans)

Solution (Python):
n = int(input())
ans = 0
for a in range(1, n):
    for b in range(1, n):
        if a * b >= n:
            break
        else:
            ans += 1
print(ans)

Solution (Python):
ans = 0
n = int(input())
for a in range(1, n):
    for b in range(a, n):
        if a*b>=n:
            break
        if a==b:
            ans+=1
        else:
            ans += 2
print(ans)

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

Solution (Python):
def main():
    N = int(input())
    nums = list(range(1, N))
    count = 0
    for i in nums:
        for j in nums:
            if N <= i * j:
                break
            count += 1
    print(count)


main()

Solution (Python):
from collections import defaultdict
N = int(input())

fact = [1] * (10**3+1)
for i in range(2, 10**3+1):
    fact[i] = i * fact[i-1]

def nCr(n, r):
    return fact[n] // (fact[r] * fact[n-r])

class Sieve:
    """
    N以下の素数を列挙するエラトステネスのふるいです。
    O(NloglogN)でできます。

    Attributes
    sieveList : その数の素因数のうち最小のものの配列
    primes : N以下の素数のリスト
    """
    def __init__(self, N):
        self.sieveList = [-1 for _ in range(N+1)]
        self.sieveList[1] = 1
        self.primes = []

        for i in range(2, N+1):
            
            if self.sieveList[i] != -1:
                continue
            self.primes.append(i)
            for j in range(i, N+1, i):
                if self.sieveList[j] != -1:
                    continue
                self.sieveList[j] = i

    def getPrimes(self):
        return self.primes

    def getSieveList(self):
        return self.sieveList

class FastFactorization(Sieve):
    """
    高速素因数分解です。
    与えられたL個の数がすべてA以下の時、
    エラトステネスでO(AloglogA)＋素因数分解でO(LlogA) = O(AloglogA+LlogA)でできます。
    「試し割り」をする必要が無いのではやいです。
    """

    def __init__(self, N):
        """
        前処理でスーパークラスのエラトステネスを使ってN以下の素因数を列挙します。
        """
        super().__init__(N)
        self.N = N
        self.sieveList = self.getSieveList()
        self.factorSet = None
        self.factorDict = None

    def factorize(self, x):
        if x > self.N:
            raise ValueError("与えられた数がエラトステネスのリストの上限を超えている")
        factorDict = defaultdict(int)
        while x > 1:
            divisor = self.sieveList[x]
            x //= divisor
            
            factorDict[divisor] += 1

        self.factorDict = factorDict

    def getFactorSet(self):
        return self.factorSet

    def getFactorDict(self):
        return self.factorDict


ff = FastFactorization(N+1)
ans = 0
for c in range(1, N):
    num = N - c
    
    tmp = 1
    if num == 1:
        ans += 1
    else:
        ff.factorize(num)
        factors = ff.getFactorDict()
        for v in factors.values():
            tmp *= nCr(2 + v - 1, v)
        ans += tmp

print(ans)

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

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


ans = sum(L)
print(ans)

Solution (Python):
import math

N = int(input())

ans = 0

for i in range(1,N):
    temp = math.ceil((N/i)-1)
    ans += temp

print(ans)

Solution (Python):
def resolve():
    n=int(input())
    ans=0
    for i in range(1,n):
        ans+=(n-1)//i
    print(ans)
resolve()

Solution (Python):
import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from math import ceil
from numba import njit
def main():
    n = int(input())
    @njit
    def s(n):
        res = 0
        for i1 in range(1, n + 1):
            for i2 in range(1, n + 1):
                if i1 * i2 >= n:
                    break
                else:
                    res += 1
        return res
    r = s(n)
    print(r)

if __name__ == '__main__':
    main()

Solution (Python):


N = int(input())

cnt = 0

for i in range(1,N): 
  for j in range(i,N): 
    if i*j<N:
      
      if i==j:
        cnt += 1
      else:
        cnt += 2
    else:
      
      break
print(cnt)

Solution (Python):
from collections import Counter

def get_prime_factors(x):
    out = []
    if x < 1:
        return out
    while not x%2:
        out.append(2)
        x //= 2
    i = 3
    while i*i <= x:
        if not x%i:
            out.append(i)
            x //= i
        else:
            i += 2
    if x != 1:
        out.append(x)
    return out



def main():
    n = int(input())
    ans = 0
    
    for i in range(1, n):
        primes = get_prime_factors(i)
        num = 1
        for k, v in Counter(primes).items():
            num *= v+1
        ans += num
    print(ans)
        

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())

sum = 0
for i in range(N-1):
    sum += int((N-1)/(i+1))
print(sum)

Solution (Python):
n = int(input())
print(sum(-1--n//i for i in range(1, n)))

Solution (Python):
n = int(input())

ans = 0
n = n-1
for i in range(1, n):
    ans += n // i
print(ans + 1)

Solution (Python):
def resolve():
    input_num = int(input())
    div_list = [input_num//i if input_num%i!=0 else input_num//i-1 for i in range(1, input_num+1) ]
    print(sum(div_list))

resolve()

Solution (Python):
N = int(input())

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

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

Solution (Python):
n=int(input())
r=0
for i in range(1,n):r+=int(n/i-1e-9)
print(r)

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array





sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
INF = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()

    ret = 0
    for a in range(1, N):
        b = N // a
        if N - (a * b) <= 0:
            ret += b - 1
        else:
            ret += b
    print(ret)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
import numpy as np
import math  
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate 
import bisect 
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache 
INF = 10**9 + 7
mod = 10**9 + 7
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
def get_sieve_of_eratosthenes(n):
    if not isinstance(n, int):
        raise TypeError('n is int-type.')
    if n < 2:
        raise ValueError('n is more than 2')
    data = [i for i in range(2, n + 1)]
    for d in data:
        data = [x for x in data if (x == d or x % d != 0)]
    return data

def main():
    n = int(input())
    
    x = math.floor(math.sqrt(n-1))
    ans = 0
    a = 1
    while(a <= x):
        ans += (n-1) // a
        a += 1
    ans -= (x - 1) * x / 2
    ans *= 2
    ans -= x
    print(int(ans))
    return 0

if __name__ == "__main__":
    main()