結果
| 問題 |
No.1423 Triangle of Multiples
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-17 12:18:09 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 791 bytes |
| コンパイル時間 | 980 ms |
| コンパイル使用メモリ | 122,128 KB |
| 最終ジャッジ日時 | 2025-01-23 02:54:52 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 4 |
ソースコード
#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
int main() {
int32_t t;
cin >> t;
vector<tuple<int32_t, int32_t, int32_t>> xs(t);
for (auto &&x : xs) {
cin >> get<0>(x) >> get<1>(x) >> get<2>(x);
}
for (auto &&x : xs) {
vector<int32_t> ys = {get<0>(x), get<1>(x), get<2>(x)};
sort(ys.begin(), ys.end());
if (!(ys[0] + ys[1] < ys[2]))
ys[0] = (ys[2] - ys[1] + 1) / ys[0] * ys[0];
cout << ys[0] << " " << ys[1] << " " << ys[2] << endl;
}
return 0;
}