結果
問題 | No.1423 Triangle of Multiples |
ユーザー |
|
提出日時 | 2020-11-27 08:47:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 600 bytes |
コンパイル時間 | 2,085 ms |
コンパイル使用メモリ | 191,328 KB |
最終ジャッジ日時 | 2025-01-16 05:59:44 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 2 TLE * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; void solve(int a, int b, int c) { for (int x = a; x <= 1000; x += a) { for (int y = b; y <= 1000; y += b) { for (int z = c; z <= 1000; z += c) { if (abs(x - y) < z && z < x + y) { cout << x << " " << y << " " << z << "\n"; return; } } } } } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int a, b, c; cin >> a >> b >> c; solve(a, b, c); } }