Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
74141 | Py自测 | 勾股数 | C++ | Accepted | 1 MS | 260 KB | 419 | 2024-05-23 10:48:05 |
#include <bits/stdc++.h> using namespace std; int main() { int ans = 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 << '\n'; ans ++; } } cout << ans << '\n'; return 0; }