結果
問題 | No.1423 Triangle of Multiples |
ユーザー |
![]() |
提出日時 | 2020-12-30 22:35:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 18 ms / 2,000 ms |
コード長 | 567 bytes |
コンパイル時間 | 2,057 ms |
コンパイル使用メモリ | 191,920 KB |
最終ジャッジ日時 | 2025-01-17 08:39:38 |
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 4 |
ソースコード
// 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)++) ll ceil(ll a,ll b){ return (a + b - 1) / b; } void main2(){ ll a,b,c;cin >> a >> b >> c; c *= ceil(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; }