結果

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

typedef long long ll;
typedef pair<int, int> P;

const ll mod =  1000000007;  //出力は (ans % mod + mod) % mod  (負の剰余を正にする)
const int inf = 1e9;
const long long INF = 1LL << 60;   // INF = 1152921504606846976

int main()
{
    int n,m;
    cin >> n >> m;
    double ans = 0;
    rep(i,n+1) ans += (double)i/(n+1);
    printf("%.10lf",ans);
}
0