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: Accepted

Solution code:
N=int(input())
 
div = [0] * (N+1)
for d in range(1, N+1):
  for n in range(d, N, d):
      div[n] += 1
 
ans = sum(div[:N])
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
answer = 0
for idx1 in range(1, n+1):
    for idx2 in range(1, ((n+1) // idx1) + 1):
        c = n - (idx1 * idx2)
        if 1 <= c < n:
            answer += 1

print(answer)

Submission status: Accepted

Solution code:
from bisect import bisect_right

N = int(input())
num = [i for i in range(1, N)]
cnt = 0
for a in range(1, N):
    n = (N - 1) // a
    b = bisect_right(num, n)
    cnt += b

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#from collections import deque
#from heapq import heapify, heappop, heappush
#from bisect import insort
#from math import gcd
#from decimal import Decimal
#mod = 1000000007
#mod = 998244353
#N = int(input())
#N, K = map(int, input().split())
#A = list(map(int, input().split()))
#flag = True
#for k in range(N):
#ans = 0
#print(ans)
#print('Yes')
#print('No')
N = int(input())
ans = 0

#N, K = map(int, input().split())
#A = list(map(int, input().split()))
#flag = True
for B in range(1, N+1):
	ans += N//B
	if N%B == 0:
		ans -= 1

#ans = 0
print(ans)
#print('Yes')
#print('No')

Submission status: Accepted

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

for i in range(1,number):
  temp = number -1
  temp_solution = int(temp/i)
  count += temp_solution
print(count)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

class PrimeFactor():
    def __init__(self, n):
        '''
            Note:
                make the table of Eratosthenes' sieve
                and minFactor[] for fast_factorization.
        '''
        self.n = n
        self.table = [True for _ in range(n+1)]
        self.table[0] = self.table[1] = False
        self.minFactor = [-1 for _ in range(n+1)]

        for i in range(2, n+1):
            if not self.table[i]: continue
            self.minFactor[i] = i 
            for j in range(i*i, n+1, i): 
                self.table[j] = False
                self.minFactor[j] = i 
    
    def fast_factorization(self, n):
        '''
            Note:
                factorization
                return the form of {factor: num}.
        '''
        data = {}
        while n > 1:
            if self.minFactor[n] not in data:
                data[self.minFactor[n]] = 1 
            else:
                data[self.minFactor[n]] += 1
            n //= self.minFactor[n]
        return data

    def count_divisors(self, n):
        '''
            Note:
                return the number of divisors of n.
        '''
        ret = 1 
        for v in self.fast_factorization(n).values():
            ret *= (v+1)
        return ret 

n = int(input())
ans = 0
a = PrimeFactor(n)
for i in range(1, n): 
    ans += a.count_divisors(i)
print(ans)

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
for a in range(1,N):
    b = (N-0.5)//a
    sum += int(b)
print(sum)

Submission status: Accepted

Solution code:
import sys
#from collections import deque
#from functools import *
#from fractions import Fraction as f
from copy import *
from bisect import *	
#from heapq import *
from math import gcd,ceil,sqrt
from itertools import permutations as prm,product
 
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
 
#sys.setrecursionlimit(10**6)
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
di=[[-1,0],[1,0],[0,1],[0,-1]]
def inc(d,c,x=1):
	d[c]=d[c]+x if c in d else x
def bo(i):
	return ord(i)-ord('A')	
def li():
	return [int(xx) for xx in input().split()]
def fli():
	return [float(x) for x in input().split()]	
def comp(a,b):
	if(a>b):
		return 2
	return 2 if a==b else 0		
def gi():	
	return [xx for xx in input().split()]
def fi():
	return int(input())
def pro(a): 
	return reduce(lambda a,b:a*b,a)		
def swap(a,i,j): 
	a[i],a[j]=a[j],a[i]	
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())			
def gh():
	sys.stdout.flush()
def isvalid(i,j):
	return 0<=i<n and 0<=j<m and a[i][j]!="."
def bo(i):
	return ord(i)-ord('a')	
def graph(n,m):
	for i in range(m):
		x,y=mi()
		a[x].append(y)
		a[y].append(x)

t=1

def sieve(MAXN): 

    spf[1] = 1
    for i in range(2, MAXN): 

        spf[i] = i 

    for i in range(4, MAXN, 2): 
        spf[i] = 2
  
    for i in range(3, ceil(sqrt(MAXN))): 

        if (spf[i] == i): 

            for j in range(i * i, MAXN, i):  

                if (spf[j] == j): 
                    spf[j] = i 
  

def fact(x): 
    ret = {}
    while (x != 1): 
        if spf[x] not in ret:
        	ret[spf[x]]=1
        else:
        	ret[spf[x]]+=1	
        x = x // spf[x] 
  
    return ret		


while t>0:
	t-=1
	n=fi()
	spf=[0]*(n+1)
	sieve(n+1)
	ans=0
	for i in range(1,n):
		r=fact(n-i)
		o=0
		p=1
		for ii in r:
			p*=(r[ii]+1)
	
		ans+=p

	print(ans)

Submission status: Accepted

Solution code:
n = int(input()) - 1
lst = [n // k for k in range(1, int(n**0.5+1))]
print(2 * sum(lst) - int(n**0.5)**2)

Submission status: Accepted

Solution code:
n = int(input())
dp = [0] * (n + 1)
for x in range(1, n + 1):
    for y in range(x, n + 1, x):
        dp[y] += 1
print(sum(dp[1:n]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
n = int(input())
ans = 0 

is_primes = [True for _ in range(n+1)]
is_primes[0] = is_primes[1] = False
minFactor = [-1 for _ in range(n+1)]

for i in range(2, n+1):
    if not is_primes[i]: continue
    minFactor[i] = i 
    for j in range(i*i, n+1, i): 
        is_primes[j] = False
        minFactor[j] = i 


def fast_factorization(n):
    data = {}
    while n > 1:
        if minFactor[n] not in data:
            data[minFactor[n]] = 1 
        else:
            data[minFactor[n]] += 1
        n //= minFactor[n]
    return data


def count_divisors(n):
    ret = 1 
    for v in fast_factorization(n).values():
        ret *= (v+1)
    return ret 

for i in range(1, n): 
    ans += count_divisors(i)

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
n = int(input())
ans = 0 

is_primes = [True for _ in range(n+1)]
is_primes[0] = is_primes[1] = False
minFactor = [-1 for _ in range(n+1)]

for i in range(2, n+1):
    if not is_primes[i]: continue
    minFactor[i] = i 
    for j in range(i*i, n+1, i): 
        is_primes[j] = False
        minFactor[j] = i 


def fast_factorization(n):
    data = {}
    while n > 1:
        if minFactor[n] not in data:
            data[minFactor[n]] = 1 
        else:
            data[minFactor[n]] += 1
        n //= minFactor[n]
    return data


def count_divisors(n):
    ret = 1 
    for v in fast_factorization(n).values():
        ret *= (v+1)
    return ret 

for i in range(1, n): 
    ans += count_divisors(i)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
tot = 0
i = 1
while i < num:
    if num % i == 0:
        i2 = num / i - 1
    else:
        i2 = int(num / i)
    tot += i2
    i += 1
print(int(tot))

Submission status: Accepted

Solution code:
import math
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
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 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
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())
mod = 10**9 + 7

#maincode-------------------------------------------------

n = ini()
ans = 0

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

print(int(ans))

Submission status: Accepted

Solution code:
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools
#from math import *
from bisect import *
from heapq import *
from collections import *

def lcm(a, b):  
    return (a*b)/gcd(a, b)

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()

######################################

N = In.int()

A = 1
summed = 0
N-=1
while N//A>0:
    amt = N//A
    summed+=amt
    A+=1

Out.int(summed)

######################################

if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

Submission status: Accepted

Solution code:
import sys
import os
import math
import bisect
import itertools
import collections
import heapq
import queue
import array

# 時々使う
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque

# 再帰の制限設定
sys.setrecursionlimit(10000000)


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


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


def lcm(x, y): return (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 i in range(1, N):
        ret += (N - 1) // i
    print(ret)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

print(sum((N-1)//a for a in range(1,N+1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    ans=0
    
    N=I()
    for a in range(1,N):
        for b in range(1,N):
            if a*b>=N:
                break
            ans+=1
            
    print(ans)

        
        
    

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(cnt)

Submission status: Accepted

Solution code:
n = int(input())

cnt = 0
for a in range(1,n+1):
    if n%a != 0:
        cnt +=n//a
    else:
        cnt +=n//a-1
    #print(a,n//a,cnt)
print(cnt)

Submission status: Accepted

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

for i in range(1, n):
  x = n//i
  y = x-1 if n==x*i else x
  ans += y
  
print(ans)

Submission status: Accepted

Solution code:
import math
def II(): return int(input())
N=II()
ans=0
Ceiling=math.floor((N-1)**0.5)
#print(Ceiling)
for i in range(1,Ceiling+1):  
    Sq=i*i
    A=N-Sq
    if A>i:
      ans+=int(2*math.ceil(A/i)-1)
      #print(ans,1)
    else:
      ans+=1
      #print(ans,2)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
t = 1
for tc in range(t):
    n = int(input())
    ans = 0
    for i in range(1,n+1):
        j = 1
        ans += (n-1) // i
        # while i*j + 1 <= n:
        #     ans += 1
        #     j += 1
    print(ans)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
d = [1]*(1000010)
for k in range(2,1000010):
    t = 1
    while k*t <= 1000001:
        d[k*t] += 1
        t += 1
for M in range(1,N):
    ans += d[M]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

"""
a x b = n-c
となる組合せを探す。
c>=1なので、a x b <= n-1ならばcを適当に決めて
組合せにできる
"""
n-=1
ans = 0
a = 1
while a <= n:
    ans += n//a
    a+=1
print(ans)

Submission status: Accepted

Solution code:
def main():
  N=int(input())
  print(sum([(N-1)//a for a in range(1,N)]))
  
if __name__=="__main__":
  main()

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

count = 0

if n%2==0:
    for i in range(int(n/2)-1):
        count += int((n-1)/(i+1))
    count += int(n/2)

else:
    for i in range(int(n/2)):
        count += int((n-1)/(i+1))
    count += int(n/2)

print(count)

Submission status: Accepted

Solution code:
n=int(input())
c=0
for a in range(1,n+1):
  c+=(n-1)//a
print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    n = II()
    ans = 0
    for a in range(1, n):
        b = n // a
        if n % a == 0:
            b -= 1
        ans += b
    print(ans)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

N = int(input())

def solve():
    cnt = 0
    for i in range(1, N):
        cnt += (N-1)//i
    print(cnt)
    return 0

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

print(cnt)

Submission status: Accepted

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

print(count)

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

case_num = 0

N = int(input())

for num in range(N - 1):
  num += 1
  
  case_num += ( math.ceil(N / num) - 1 )


print(case_num)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans =0

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

Submission status: Accepted

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

if __name__ == "__main__":
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:


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

Submission status: Accepted

Solution code:
# This code is generated by [Atcoder_base64](https://github.com/kyomukyomupurin/AtCoder_base64)
import base64
import subprocess
import zlib


exe_bin = "c%1E9e{dUhcK_;!V<mPZIXH<41dAZJm?XkV>|iJLVcAl$;^f2^JCIVsMwaAQM3!7>6&xl&I3?lsj3C@FG@YYu+H0?2rc=1~u4OtmhfTN`ZrU3|OPdys3s;~Lg-HT5I3bDp-gm!WX?LwX?r!=|XY%#fZ{KI%d;7lc`@Y}Z{qFN4fzT$i$wYXwkgpQtjxAL9ZidgSDT@HsLFU8X8_04p4|uCePETh|T52m_N73srE4-dwPqfseqBX?04K!*gA+E9>`r5i&L0gx*G_=63J7(|F=$V<G!1M$r&#9B?amxE=Wxs<A*Hb^yQY)kV?@LiUey>5{^>mPEDcAct=*=U)eseOqja|<uE;GzuPWd?8mWU6nZ@VoKU6Y6>v*T;VJJzpR-{#4rJZq^>PA0o~%XTV{<84;?+{iFIf2w)cBJuLk3*Ts~`|Q#Ezv%kP+lBkhOoopeM%V<Jd{`Tg*7s(fspT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X2-lP&!FbqTA_p9TZ{AF+kk`6cW3{{kH-Ur7"

open("./kyomu", 'wb').write(zlib.decompress(base64.b85decode(exe_bin)))
subprocess.run(["chmod +x ./kyomu"], shell=True)
subprocess.run(["./kyomu"], shell=True)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

n=int(input())
c=0

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
print(sum([n//a+(0 if n%a else -1) for a in range(1,n)]))

Submission status: Accepted

Solution code:
#!/usr/bin/env python

n = int(input())
ans = 0 

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

Submission status: Accepted

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

for n in range(1,N):
    #print(n)
    count += (N-1) //n
print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


print(2*ans -t)

Submission status: Accepted

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

Submission status: Accepted

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

print(2*ans -t)

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
N=int(input())
x=0
for n in range(1,N):
  x+=(N-1)//n
print(x)

Submission status: Accepted

Solution code:
import math
N = int(input())
A = [0]*(N)
for i in range(0,N):
    A[i] = math.floor((N-1)/(i+1))
print(sum(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

result = 0

for a in range(1, N):
    result += (N - 1) // a

print(result)

Submission status: Accepted

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


def II(): return int(sys.stdin.readline())


def MI(): return map(int, sys.stdin.readline().split())


def LI(): return list(map(int, sys.stdin.readline().split()))


def main():
    N = II()

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

    print(ans)


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ans=0
for a in range(1,n+1):
    for b in range(1,(n//a)+2):
        c=n-a*b
        if c>0:ans+=1
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

ans = 0

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

print(int(ans))