結果
問題 |
No.454 逆2乗和
|
ユーザー |
|
提出日時 | 2016-12-05 00:20:41 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 937 ms |
コンパイル使用メモリ | 65,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-27 20:08:11 |
合計ジャッジ時間 | 6,395 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 31 |
ソースコード
#include "iostream" #include "iomanip" #include "math.h" using namespace std; long double N; long double ans; long double num[100000]; int main() { cin >> N; for (int i = 120000; i >= 1; i--) { num[i] = (N + i)*(N + i); ans += 1.0/num[i]; cout << setprecision(20) << ans << "\n"; } cout << setprecision(20) << ans << "\n"; return 0; }