提交时间:2026-01-11 21:02:41

运行 ID: 82414

#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; }