15
113
3715
论坛元老
#include<bits/stdc++.h> using namespace std; int main(){ int a,b=0,c=0; cin>>a; for(int i=1;i<=a;i++){ for(int j=i+1;j<=a;j++){ for(int w=j+1;w<=a;w++){ b++; if((i*i+j*j)==w*w){ c+=1; } } } }cout<<c<<b; return 0; }
使用道具 举报
本版积分规则 发表回复 回帖后跳转到最后一页