結果

問題 No.1423 Triangle of Multiples
ユーザー lynmisakuralynmisakura
提出日時 2020-12-30 22:54:31
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 514 bytes
コンパイル時間 2,332 ms
コンパイル使用メモリ 193,040 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-21 18:53:11
合計ジャッジ時間 3,377 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 16 ms
6,944 KB
testcase_04 AC 15 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// solution for yukicoder_5395
// author : lynmisakura
#include<bits/stdc++.h>
using namespace std;

using ll = long long;
#define REP(i,N) for(int (i) = 0;(i) < (N);(i)++)

void main2(){

  ll a,b,c;cin >> a >> b >> c;
  
  c *= max({a,b,c}) / c;
  assert(a <= c && b <= c);
  
  a *= (c / a);
  b *= (c / b);

  cout << a << ' ' << b << ' ' << c << '\n';

}
int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  //cout << fixed << setprecision(20);

  int tt;cin >> tt;
  while(tt--) main2();
  return 0;
}
0