| 记录编号 | 50184 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 159.[USACO Oct07] 完全平方数 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.006 s | ||
| 提交时间 | 2012-11-15 18:33:12 | 内存使用 | 0.31 MiB | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
freopen("squares.in","r",stdin);
freopen("squares.out","w",stdout);
int A,B,N,ans=0;
cin>>N;
for(A=1;A<=500;A++)
for(B=1;B<=500;B++)
if(A*A==B*B+N)
ans++;
cout<<ans<<endl;
return 0;
}