CF665F.Four Divisors

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

If an integer aa is divisible by another integer bb , then bb is called the divisor of aa .

For example: 1212 has positive 66 divisors. They are 11 , 22 , 33 , 44 , 66 and 1212 .

Let’s define a function D(n)D(n) — number of integers between 11 and nn (inclusive) which has exactly four positive divisors.

Between 11 and 1010 only the integers 66 , 88 and 1010 has exactly four positive divisors. So, D(10)=3D(10)=3 .

You are given an integer nn . You have to calculate D(n)D(n) .

输入格式

The only line contains integer nn ( 1<=n<=10111<=n<=10^{11} ) — the parameter from the problem statement.

输出格式

Print the only integer cc — the number of integers between 11 and nn with exactly four divisors.

输入输出样例

  • 输入#1

    10
    

    输出#1

    3
    
  • 输入#2

    20
    

    输出#2

    5
    
首页