結果

問題 No.413 +5,000,000pts
ユーザー nebukuro09nebukuro09
提出日時 2017-07-11 14:55:02
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 478 bytes
コンパイル時間 2,102 ms
コンパイル使用メモリ 194,096 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-04-16 17:00:58
合計ジャッジ時間 9,512 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i,n) for (int i=0;i<(n);i++)
#define REP2(i,m,n) for (int i=m;i<(n);i++)

ll calc(ll d) {
    return (ll)((-1 + sqrt(1 + 4*d)) / 2.0);
}


int main() {
    int cnt = 0;
    for (ll i = 40000000; ; ++i) {
        ll d = i * i + i;
        ll t = calc(d);
        if (t != i) cout << i << " " << t << " " << d << "\n", cnt++;
        if (cnt == 100000) break;
    }
    cout << endl;
    return 0;
}
0