数据范围:
import java.util.*;
public class Solution {
/**
* 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
*
*
* @param c int整型
* @return bool布尔型
*/
public boolean square (int c) {
// write code here
long num=c;
for(long i=1;i<=10000;i++){
if(Math.pow(i,2)>c){
break;
}
for(long j=1;j<=10000;j++){
if(Math.pow(i,2)+Math.pow(j,2)==c){
return true;
}
if(Math.pow(j,2)>c){
break;
}
}
}
return false;
}
}