Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
110075 胡海峰老师 勾股数 C++ Accepted 1 MS 264 KB 283 2025-02-14 12:42:27

Tests(1/1):


Code:

#include <iostream> using namespace std; int main(){ int cnt=0; for(int i=1;i<=100;i++) for(int j=i;j<=100;j++) for(int k=j;k<=100;k++) if( i*i + j*j == k*k) { cout<< i <<" "<<j <<" "<<k <<endl; cnt++; } cout<<cnt; return 0; }