結果

問題 No.454 逆2乗和
ユーザー kimiyukikimiyuki
提出日時 2016-12-05 02:16:28
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 352 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 229 ms
コンパイル使用メモリ 36,568 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-20 03:14:02
合計ジャッジ時間 13,438 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 335 ms
4,376 KB
testcase_01 AC 340 ms
4,376 KB
testcase_02 AC 340 ms
4,380 KB
testcase_03 AC 348 ms
4,376 KB
testcase_04 AC 335 ms
4,380 KB
testcase_05 AC 338 ms
4,376 KB
testcase_06 AC 345 ms
4,376 KB
testcase_07 AC 336 ms
4,376 KB
testcase_08 AC 335 ms
4,380 KB
testcase_09 AC 342 ms
4,380 KB
testcase_10 AC 337 ms
4,376 KB
testcase_11 AC 352 ms
4,376 KB
testcase_12 AC 351 ms
4,376 KB
testcase_13 AC 350 ms
4,384 KB
testcase_14 AC 345 ms
4,380 KB
testcase_15 AC 342 ms
4,376 KB
testcase_16 AC 342 ms
4,380 KB
testcase_17 AC 351 ms
4,380 KB
testcase_18 AC 348 ms
4,380 KB
testcase_19 AC 349 ms
4,376 KB
testcase_20 AC 349 ms
4,380 KB
testcase_21 AC 341 ms
4,376 KB
testcase_22 AC 349 ms
4,380 KB
testcase_23 AC 341 ms
4,380 KB
testcase_24 AC 336 ms
4,376 KB
testcase_25 AC 347 ms
4,380 KB
testcase_26 AC 339 ms
4,376 KB
testcase_27 AC 342 ms
4,380 KB
testcase_28 AC 346 ms
4,380 KB
testcase_29 AC 333 ms
4,376 KB
testcase_30 AC 337 ms
4,376 KB
testcase_31 AC 339 ms
4,380 KB
testcase_32 AC 336 ms
4,376 KB
testcase_33 AC 344 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cmath>
#define repeat_from(i,m,n) for (int i = (m); (i) < (n); ++(i))
int main() {
    long double x; scanf("%Lf", &x);
    long double y = 0;
    repeat_from (n,1,10000000) y += powl(x+n, -2);
    y += 0.0000001;
    printf("%.12Lf\n", y);
    return 0;
}
0