結果
| 問題 | No.413 +5,000,000pts |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-12 23:53:58 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 222 ms / 5,000 ms |
| コード長 | 501 bytes |
| 記録 | |
| コンパイル時間 | 353 ms |
| コンパイル使用メモリ | 77,828 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-07 23:31:32 |
| 合計ジャッジ時間 | 1,468 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
ソースコード
#include<iostream>
#include<cmath>
using namespace std;
const int CNT_LIMIT = 100000;
long long wrongCalc(long long d) {
return (long long) ((-1 + sqrt(1 + 4 * d)) / 2.0);
}
void work() {
int cnt = 0;
for (long long t = 1; ; ++t) {
long long d = t * t + t - 1;
if (wrongCalc(d) == t) {
cout << d << endl;
++cnt;
if (cnt == CNT_LIMIT) {
break;
}
}
}
}
int main() {
work();
return 0;
}