問題一覧 > 通常問題

No.1162 Many Quotients hard

レベル : / AI推定難易度 : 1200 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 85
作問者 : 蜜蜂 / テスター : Mitarushi
お気に入りにしたユーザー ProblemId : 4960 / 自分の提出
問題文最終更新日: 2020-08-11 23:24:06
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original

Problem Statement

The problem statement is the same as Many Quotients easy, but the constraints are harder.
You are given a positive integer $N$.
Let $N/K$ denote the quotient (an integer) when $N$ is divided by a positive integer $K$. Find how many distinct integers appear among $N/1,N/2,...,N/N$.

Input

$N $

$N$ is an integer.
$1 \leq N \leq 10^{18}$

Output

Output the answer on $1$ line.
Print a newline at the end.

Sample

Sample 1
Input
3
Output
2

The values of $3/1,3/2,3/3$ are $3,1,1$ respectively, so $2$ distinct values appear. Therefore, output $2$.

Sample 2
Input
319
Output
34

Source

Nada High School 75th Class Junior High School Graduation Commemorative Contest: Many Quotients hard
writer: karudano
tester: Mitarushi
Ported in accordance with HackerRank's terms of service. Some parts have been modified.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。