Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
153652 陈棋 勾股数 C++ Accepted 2 MS 260 KB 289 2026-05-23 16:54:02

Tests(1/1):


Code:

#include<iostream> using namespace std; int main(){ int count=0; for(int a=1;a<=100;a++){ for(int b=a+1;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; }