結果
| 問題 |
No.454 逆2乗和
|
| ユーザー |
|
| 提出日時 | 2016-12-05 18:28:56 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 244 bytes |
| コンパイル時間 | 585 ms |
| コンパイル使用メモリ | 56,540 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-27 22:33:33 |
| 合計ジャッジ時間 | 27,898 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 31 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:6:18: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | double x; scanf("%lf", &x);
| ~~~~~^~~~~~~~~~~
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
int main(void) {
double x; scanf("%lf", &x);
double res = 0;
for(int loop=0; loop<400000000; ++loop) {
res += 1. / (++x * x);
}
printf("%.15lf\n", res);
return 0;
}