キャディプログラミングコンテスト2021(AtCoder Beginner Contest 193)
翻译中…
Problem Statement
翻译中…
Given is an integer $N$. How many integers between $1$ and $N$ (inclusive) are unrepresentable as $a^b$, where $a$ and $b$ are integers not less than $2$?
翻译中…
Constraints
翻译中…
$N$is an integer.$1 ≤ N ≤ 10^{10}$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print the answer.
翻译中…
样例
Input #1
8
Output #1
6
$4$ and $8$ are representable as $a^b$: we have $2^2 = 4$ and $2^3 = 8$.
On the other hand, $1$, $2$, $3$, $5$, $6$, and $7$ are unrepresentable as $a^b$ using integers $a$ and $b$ not less than $2$, so the answer is $6$.
Input #2
100000
Output #2
99634
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。