結果
問題 |
No.522 Make Test Cases(テストケースを作る)
|
ユーザー |
|
提出日時 | 2021-06-10 13:04:53 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 128 ms / 2,000 ms |
コード長 | 337 bytes |
コンパイル時間 | 1,981 ms |
コンパイル使用メモリ | 191,620 KB |
最終ジャッジ日時 | 2025-01-22 05:15:32 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; for (int a = 1; a <= n; a++) { for (int b = 1; a + b <= n; b++) { int c = n - a - b; if (c >= a && c >= b && b >= a) { cout << a << ' ' << b << ' ' << c << '\n'; } } } return 0; }