結果
| 問題 |
No.1423 Triangle of Multiples
|
| コンテスト | |
| ユーザー |
snow39
|
| 提出日時 | 2021-03-12 21:35:36 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 20 ms / 2,000 ms |
| コード長 | 936 bytes |
| コンパイル時間 | 928 ms |
| コンパイル使用メモリ | 102,280 KB |
| 最終ジャッジ日時 | 2025-01-19 14:20:42 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 4 |
ソースコード
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <cmath>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <tuple>
#define mkp make_pair
#define mkt make_tuple
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(),v.end()
using namespace std;
typedef long long ll;
const ll MOD=1e9+7;
template<class T> void chmin(T &a,const T &b){if(a>b) a=b;}
template<class T> void chmax(T &a,const T &b){if(a<b) a=b;}
void solve(){
ll A,B,C;
cin>>A>>B>>C;
vector<ll> ans(3,0);
ll ma=max(A,max(B,C));
if(A==ma){
ans[0]=A;
ans[1]=B*C*A;
ans[2]=B*C*A;
}else if(B==ma){
ans[0]=A*B*C;
ans[1]=B;
ans[2]=A*B*C;
}else{
ans[0]=A*B*C;
ans[1]=A*B*C;
ans[2]=C;
}
cout<<ans[0]<<" "<<ans[1]<<" "<<ans[2]<<"\n";
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int T;
cin>>T;
rep(i,T) solve();
return 0;
}
snow39