結果
問題 |
No.1423 Triangle of Multiples
|
ユーザー |
![]() |
提出日時 | 2021-03-25 20:50:23 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 540 bytes |
コンパイル時間 | 1,709 ms |
コンパイル使用メモリ | 192,880 KB |
最終ジャッジ日時 | 2025-01-19 21:43:53 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 2 TLE * 2 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i<n;i++) typedef pair<int,int>P; ll x[3]; int main(){ int t; cin>>t; rep(i,t){ ll a,b,c; cin>>a>>b>>c; x[0]=a; x[1]=b; x[2]=c; while(1){ if(a+b>c && a+c>b && a<b+c){ cout<<a<<" "<<b<<" "<<c<<endl; return 0; } if(a>b && b>c){ c+=x[2]; continue; } if(a<b && b<c){ a+=x[0]; continue; } if(b<a && b<c){ b+=x[1]; continue; } } } }