Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153654 杨峻熙 勾股数 C++ Accepted 3 MS 264 KB 298 2026-05-23 16:55:35

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int count=0; for(int a=0;a<=100;a++){ for(int b=1+a;b<=100;b++){ for(int c=b+1;c<=100;c++){ if(a*a+b*b==c*c){ cout<<a<<" "<<b<<" "<<c<<endl; count++; } } } } cout<<count<<endl; return 0; }