結果
| 問題 | 
                            No.1423 Triangle of Multiples
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2021-07-17 12:24:56 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 79 ms / 2,000 ms | 
| コード長 | 984 bytes | 
| コンパイル時間 | 898 ms | 
| コンパイル使用メモリ | 119,248 KB | 
| 最終ジャッジ日時 | 2025-01-23 02:54:58 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 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)};
        int32_t i = 0;
        if (ys[i] < ys[1])
            i = 1;
        if (ys[i] < ys[2])
            i = 2;
        for (auto j = 0; j < 3; ++j) {
            int64_t t;
            if (j == i)
                t = ys[j];
            else
                t = int64_t(ys[i] + ys[j] - 1) / ys[j] * ys[j];
            cout << (j == 0 ? "" : " ") << t;
        }
        cout << endl;
    }
    return 0;
}