Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
74183 | 福娃 | 勾股数 | C++ | Accepted | 1 MS | 260 KB | 279 | 2024-05-23 21:31:38 |
#include<bits/stdc++.h> using namespace std; int main(){ int ans=0; for(int a=1;a<=100;a++){ for(int b=a;b<=100;b++){ for(int c=b;c<=100;c++){ if(a*a+b*b==c*c){ cout<<a<<' '<<b<<' '<<c<<"\n"; ans++; } } } } cout<<ans; return 0; }