我们把一个能被表示成某个整数的平方的数称为完全平方数。 例如,,所以,是完全平方数。 现在输入一个整数为(),请聪明的你判断它是不是由某个完全平方数对取模得到的呢。
示例1
输入
24
输出
true
说明
备注:
加载中...
import java.util.*; public class Solution { /** * * @param x int整型 * @return bool布尔型 */ public boolean solve (int x) { // write code here } }
class Solution { public: /** * * @param x int整型 * @return bool布尔型 */ bool solve(int x) { // write code here } };
# # # @param x int整型 # @return bool布尔型 # class Solution: def solve(self , x ): # write code here
/** * * @param x int整型 * @return bool布尔型 */ function solve( x ) { // write code here } module.exports = { solve : solve };
# # # @param x int整型 # @return bool布尔型 # class Solution: def solve(self , x ): # write code here
package main /** * * @param x int整型 * @return bool布尔型 */ func solve( x int ) bool { // write code here }
/** * * @param x int整型 * @return bool布尔型 */ bool solve(int x ) { // write code here }
24
true