結果

問題 No.3301 Make Right Triangle
コンテスト
ユーザー ripity
提出日時 2025-10-05 15:55:41
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 5,483 ms
コンパイル使用メモリ 335,140 KB
実行使用メモリ 7,716 KB
最終ジャッジ日時 2025-10-05 15:56:12
合計ジャッジ時間 6,177 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 9
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:15:12: warning: ‘T’ is used uninitialized [-Wuninitialized]
   15 |     while(T--) {
      |           ~^~
main.cpp:14:9: note: ‘T’ was declared here
   14 |     int T;
      |         ^

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#include <atcoder/all>
using namespace atcoder;

using ll = long long;
using mint = modint998244353;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int T;
    while(T--) {
        ll L;
        cin >> L;
        ll p = L * L, q = 1;
        cout << L << " " << (p + q) / 2 << " " << (p - q) / 2 << "\n";
    }
}
0