結果

問題 No.413 +5,000,000pts
ユーザー koba-e964koba-e964
提出日時 2016-12-19 14:40:45
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 850 bytes
コンパイル時間 1,377 ms
コンパイル使用メモリ 86,468 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-05-08 06:58:45
合計ジャッジ時間 1,638 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
const ll mod = 1e9 + 7;

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


int main(void){
  REP(i, 0, 100000) {
    ll t = 1e7 + i;
    if (calc(t *t + t) != t + 1) {
      cout << t * t + t << endl;
    } else {
      assert(0);
    }
  }
}
0