結果

問題 No.1033 乱数サイ
ユーザー Shawn stayCShawn stayC
提出日時 2020-06-08 09:37:24
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 248 bytes
コンパイル時間 1,245 ms
コンパイル使用メモリ 162,860 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-08-26 01:56:37
合計ジャッジ時間 2,717 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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

int main(){
	int n,k; cin>>n>>k;
	n+=1;
	int b=(n)*k;
	int ans=0;
	rep(i,n) ans+=i*k;
	cout.precision(10);
	cout << ans/(n*k) << endl;	
}
0