完全平方数的尾巴
比赛主页
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 64 M,其他语言128 M
64bit IO Format: %lld
题目描述
我们把一个能被表示成某个整数的平方的数称为完全平方数。
例如
,
,所以
,
是完全平方数。
现在输入一个整数为
(
),请聪明的你判断它是不是由某个完全平方数对
取模得到的呢。
示例1
输入
复制
24
24
返回值
复制
true
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