結果
問題 |
No.454 逆2乗和
|
ユーザー |
|
提出日時 | 2016-12-05 00:21:00 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 348 bytes |
コンパイル時間 | 539 ms |
コンパイル使用メモリ | 65,856 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-27 20:08:29 |
合計ジャッジ時間 | 5,578 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 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 = 100000; 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; }