結果
| 問題 | No.1033 乱数サイ | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-04-24 22:02:36 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 645 bytes | 
| コンパイル時間 | 1,368 ms | 
| コンパイル使用メモリ | 166,636 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-15 02:52:04 | 
| 合計ジャッジ時間 | 1,985 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 9 WA * 6 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, s, e) for (ll i = s; i < e; ++i)
#define sort_(a) sort(a.begin(), a.end())
#define rsort(a) sort(a.rbegin(), a.rend())
#define sum(a) accumulate(a.begin(), a.end(), 0LL)
#define __lcm(a, b) std::__detail::__lcm(a, b)
typedef long long unsigned int ll;
const long mod = 1e9 + 7;
int main(void) {
#ifdef DEBUG
  freopen("input.txt", "r", stdin);
#endif
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ll N, K;
  cin >> N >> K;
  ll deno = (N + 1) * K;
  ll nume = 0;
  rep(i, 0, N + 1) {
    nume += i * K;
  }
  double ans = nume / deno;
  printf("%.10f\n", ans);
  return 0;
}
            
            
            
        