結果
| 問題 | No.3301 Make Right Triangle | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2025-10-05 14:14:45 | 
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 43 ms / 2,000 ms | 
| コード長 | 604 bytes | 
| コンパイル時間 | 2,807 ms | 
| コンパイル使用メモリ | 275,572 KB | 
| 実行使用メモリ | 7,716 KB | 
| 最終ジャッジ日時 | 2025-10-05 14:15:18 | 
| 合計ジャッジ時間 | 7,402 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 9 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll T;
    cin>>T;
    for(int t=0;t<T;t++){
        ll L;
        cin>>L;
        ll d=1;
        while(L%2==0){
            L/=2;
            d*=2;
        }
        if(L==1){
            d/=4;
            L*=4;
            cout<<3*d<<" "<<4*d<<" "<<5*d<<"\n";
            // cout<<"mada\n";
        }
        else{
            ll A=(L*L+1)/2;
            ll B=(L*L-1)/2;
            ll C=L;
            cout<<A*d<<" "<<B*d<<" "<<C*d<<"\n";
        }
    }
}  
            
            
            
        