记录编号 | 93568 | 评测结果 | AAAAAAAAAA | ||
---|---|---|---|---|---|
题目名称 | [USACO Oct07] 完全平方数 | 最终得分 | 100 | ||
用户昵称 | 是否通过 | 通过 | |||
代码语言 | C++ | 运行时间 | 0.006 s | ||
提交时间 | 2014-03-26 23:37:58 | 内存使用 | 0.29 MiB | ||
- #include <stdio.h>
- int main() {
- int i,j;
- int a,b;
- int m,n;
- int N;
- int count=0;
- freopen("squares.in","r",stdin);
- freopen("squares.out","w",stdout);
- scanf("%d",&N);
- for(i=1;i<=500;i++)
- for(j=1;j<i;j++) {
- m=i*i;
- n=j*j;
- if(m-n==N) count++;
- }
- printf("%d",count);
- return 0;
- }