結果
問題 | No.413 +5,000,000pts |
ユーザー |
![]() |
提出日時 | 2016-08-13 00:38:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 15 ms / 5,000 ms |
コード長 | 438 bytes |
コンパイル時間 | 1,357 ms |
コンパイル使用メモリ | 158,804 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 16:09:39 |
合計ジャッジ時間 | 1,676 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 |
ソースコード
#include<bits/stdc++.h>using namespace std;typedef long long ll;ll calc(ll d) {return (ll)((-1 + sqrt(1 + 4*d)) / 2.0);}ll solve(ll d){for(ll t=calc(d)+5;;t--){if(t*t+t<=d)return t;}}int main(){int cnt=0;for(ll i=100000000;;i++){if(calc(i*i+i-1)!=solve(i*i+i-1)){printf("%lld\n",i*i+i-1);cnt++;if(cnt==100000)break;}}return 0;}