Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
82414 sh25_shenpy 勾股数 C++ 通过 0 MS 244 KB 333 2026-01-11 21:02:41

Tests(2/2):


#include<bits/stdc++.h> using namespace std; bool checkint(double x){ if(int(x)==x) return true; else return false; } int main(){ int n,s=0; cin>>n; int c=n; for(;c>=1;--c){ for(int a=1;a<=sqrt(c*c/2);++a){ if(checkint(sqrt(c*c-a*a))==true) ++s; }} cout<<s; return 0; }


测评信息: