完全平方判定
perfect square
题目详情
在区间 内,有多少个整数 使得 是完全平方数?
英文原题
How many integers such that is a perfect square are there in range [100: 400]?
解析
设 ,则
要成为完全平方,所有指数 必须为偶数。
- 若 为偶数,则任意 都有 为偶数,恒成立。
- 若 为奇数,则需每个 都为偶数,即 本身是完全平方数。
因此符合条件的 = “所有偶数” + “奇完全平方数”。
- 区间 内偶数个数:
- 区间内奇平方数:,共 5 个。
总数
英文解析
Let . Then
For to be a perfect square, all exponents must be even.
- If is even, then for any , is even, which always holds.
- If is odd, then each must be even, meaning itself is a perfect square.
Thus, the qualifying are "all even numbers" plus "odd perfect squares".
- Number of even numbers in the interval :
- Number of odd perfect squares in the interval: , totaling 5.
The total count is