結果

問題 No.1033 乱数サイ
ユーザー Y_SY_S
提出日時 2020-07-06 19:50:06
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 246 bytes
コンパイル時間 628 ms
コンパイル使用メモリ 63,208 KB
実行使用メモリ 5,092 KB
最終ジャッジ日時 2023-10-24 22:21:55
合計ジャッジ時間 2,008 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>

using namespace std;

int main() {

	int N, K;
	cin >> N >> K;

	int denom = (N + 1) * K;
	int numer = 0;
	for (int i = 0; i <= N; i++) {
		numer += i * K;
	}

	double ans = numer / denom;
	cout << ans << endl;

	return 0;

}
0