結果
問題 | No.454 逆2乗和 |
ユーザー |
|
提出日時 | 2017-12-15 14:04:22 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 232 bytes |
コンパイル時間 | 2,283 ms |
コンパイル使用メモリ | 150,832 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-12 23:07:37 |
合計ジャッジ時間 | 3,357 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 |
ソースコード
import std.algorithm, std.conv, std.range, std.stdio, std.string;void main(){auto n = 10^^5;auto x = readln.chomp.to!real;auto r = 0.0L;foreach (i; 1..n)r += 1.0L/(x+i)^^2;writefln("%.10f", r+1.0L/(x+n));}