102272: [AtCoder]ABC227 C - ABC conjecture

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $300$ points

Problem Statement

You are given a positive integer $N$.

Find the number of triples of positive integers $(A, B, C)$ such that $A\leq B\leq C$ and $ABC\leq N$.

The Constraints guarantee that the answer is less than $2^{63}$.

Constraints

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

Input

Input is given from Standard Input in the following format:

$N$

Output

Print the answer.


Sample Input 1

4

Sample Output 1

5

There are five such triples: $(1,1,1),(1,1,2),(1,1,3),(1,1,4),(1,2,2)$.


Sample Input 2

100

Sample Output 2

323

Sample Input 3

100000000000

Sample Output 3

5745290566750

Input

题意翻译

#### 题目描述 给出正整数 $ N $。 求 $ A\leq\ B\leq\ C $ 并且 $ ABC\leq\ N $ 的正整数对 $ (A,B,C) $ 的个数。 注意,在限制的条件下,保证答案小于 $ 2^{63}$。 #### 输入格式 输入按以下格式: > $ N $ #### 输出格式 输出答案。 #### 提示/说明 条件 - $ 1\ \leq\ N\ \leq\ 10^{11} $ - $ N $是整数 样例解释 $1$: 满足条件的组有 $5$ 组:$(1,1,1),(1,1,2),(1,1,3),(1,1,4),(1,2,2)$。

Output

得分:300分

问题描述

给你一个正整数 N。

找出满足 $A\leq B\leq C$ 和 $ABC\leq N$ 的正整数三元组 $(A, B, C)$ 的数量。

约束条件保证答案小于 $2^{63}$。

约束条件

  • $1 \leq N \leq 10^{11}$
  • $N$ 是一个整数。

输入

从标准输入按照以下格式获取输入:

$N$

输出

输出答案。


样例输入 1

4

样例输出 1

5

存在五个满足条件的三元组:$(1,1,1),(1,1,2),(1,1,3),(1,1,4),(1,2,2)$。


样例输入 2

100

样例输出 2

323

样例输入 3

100000000000

样例输出 3

5745290566750

加入题单

算法标签: