結果

問題 No.1076 寿司打
ユーザー 蜜蜂蜜蜂
提出日時 2020-06-12 21:25:10
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 301 bytes
コンパイル時間 2,560 ms
コンパイル使用メモリ 164,624 KB
実行使用メモリ 7,828 KB
最終ジャッジ日時 2023-09-06 09:42:37
合計ジャッジ時間 5,618 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 310 ms
7,804 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define ll long long
using namespace std;

int main(){
  long double a;
  cin>>a;
  long double p=0;
  for(int i=0;i<10000;i++){
    double x=1;
    for(int j=0;j<i;j++){
      x*=a;
    }
    x*=i;
    p+=x;
  }
  p*=(1-a);
  cout<<fixed<<setprecision(15);
  cout<<p<<endl;
}
0