P6685 The Diameter Problem of a Persistent Dynamic Cactus.
Background
As everyone knows, an exam needs an easy “check-in” problem.
Description
Given $n, m$, find how many positive integers $x$ satisfy $x^m \le n$.
Input Format
One line with two positive integers $n, m$.
Output Format
Output one integer, the number of positive integers $x$.
Explanation/Hint
For $25\%$ of the testdata, $m = 1$.
For $50\%$ of the testdata, $n \le 10^6$.
For $100\%$ of the testdata, $1 \leq n, m \le 10^9$.
---
$\text{upd 2022.7.24}$: A new set of hack testdata has been added.
Translated by ChatGPT 5