結果

問題 No.1033 乱数サイ
ユーザー motmot
提出日時 2020-04-24 21:23:29
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 478 bytes
コンパイル時間 597 ms
コンパイル使用メモリ 80,672 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-15 02:17:44
合計ジャッジ時間 1,226 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
const int inf=1e9+7;
const ll mod=1e9+7;

int main() {
    double N, K;
    cin>>N>>K;
    double ue = 0;
    for(double i=0;i<=N;++i){
        ue += i * K;
    }
    cout<<setprecision(15)<<ue/K/(N+1)<<endl;
}

0