Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
161357 王垚植 勾股数 C++ Accepted 2 MS 260 KB 296 2026-10-04 11:16:58

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