結果
| 問題 |
No.3301 Make Right Triangle
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-10-05 14:49:07 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 254 ms / 2,000 ms |
| コード長 | 261 bytes |
| コンパイル時間 | 2,817 ms |
| コンパイル使用メモリ | 275,644 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-05 14:49:24 |
| 合計ジャッジ時間 | 9,405 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
int ttt;
cin>>ttt;
while(ttt--){
ll l;
cin>>l;
ll a,b;
if(l%2==0){
a=l/2;
b=1;
}else{
b=l/2;
a=b+1;
}
cout<<a*a-b*b<<" "<<2*a*b<<" "<<a*a+b*b<<endl;
}
}