結果
| 問題 |
No.413 +5,000,000pts
|
| ユーザー |
|
| 提出日時 | 2020-02-20 04:08:11 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 134 ms / 5,000 ms |
| コード長 | 347 bytes |
| コンパイル時間 | 845 ms |
| コンパイル使用メモリ | 68,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-08 18:40:13 |
| 合計ジャッジ時間 | 1,377 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 |
コンパイルメッセージ
main.cpp:8:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
8 | main()
| ^~~~
ソースコード
#include<iostream>
#include<cmath>
using namespace std;
long calc(long d)
{
return(long)((-1+sqrt(1+4*d))/2.0);
}
main()
{
int cnt=0;
for(long t=999999999;cnt<100000;t--)
{
long d=t*t+t-1;
long lim=(t-1)*(t-1)+t-1;
while(lim<=d&&cnt<100000)
{
if(calc(d)!=t-1)
{
cout<<d<<endl;
cnt++;
}
else break;
d--;
}
}
}