結果
問題 | No.1423 Triangle of Multiples |
ユーザー | kpinkcat |
提出日時 | 2023-09-05 00:25:05 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 76 ms / 2,000 ms |
コード長 | 800 bytes |
コンパイル時間 | 4,519 ms |
コンパイル使用メモリ | 198,936 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-05 00:25:22 |
合計ジャッジ時間 | 3,792 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,380 KB |
testcase_01 | AC | 1 ms
4,384 KB |
testcase_02 | AC | 76 ms
4,380 KB |
testcase_03 | AC | 67 ms
4,380 KB |
testcase_04 | AC | 67 ms
4,380 KB |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> #include <iomanip> #include<set> #include <numeric> #include<string> using namespace std; int main() { int t; cin >> t; bool tang = false; for (int i = 0; i < t; i++){ int a, b, c, d, e, f; cin >> a >> b >> c; if (a == min({a, b, c})){ if (b == max({a, b, c})) a = b - b%a; else a = c - c%a; } if (b == min({a, b, c})){ if (a == max({a, b, c})) b = a - a%b; else b = c - c%b; } if (c == min({a, b, c})){ if (a == max({a, b, c})) c = a - a%c; else c = b - b%c; } cout << a << " " << b << " " << c << endl; } }