結果
| 問題 |
No.1033 乱数サイ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-24 21:36:38 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 647 bytes |
| コンパイル時間 | 1,397 ms |
| コンパイル使用メモリ | 165,760 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-15 02:30:40 |
| 合計ジャッジ時間 | 2,166 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 8 WA * 6 RE * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i, s, e) for (int 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);
int 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;
}