結果

問題 No.454 逆2乗和
ユーザー olphe
提出日時 2016-12-05 00:04:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 283 bytes
コンパイル時間 693 ms
コンパイル使用メモリ 66,884 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-27 19:59:09
合計ジャッジ時間 1,814 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "iostream"
#include "iomanip"
#include "math.h"
using namespace std;

long double N;
long double ans;

int main() {
	cin >> N;
	for (long double i = 1; i < 100000; i+=1) {
		ans += (long double)1 / (i + N) / (i + N);
	}
	cout << setprecision(20) << ans << "\n";
	return 0;
}
0