結果
問題 | No.1033 乱数サイ |
ユーザー |
|
提出日時 | 2020-04-24 23:05:15 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 320 bytes |
コンパイル時間 | 1,889 ms |
コンパイル使用メモリ | 163,816 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 17:41:16 |
合計ジャッジ時間 | 2,567 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 15 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main() { double n,k; cin>>n>>k; double sum = 0.0; n = n+1; double total = (n*k); //cout<<total<<endl; total = (1.00/total); //cout<<total<<endl; for(int i=0; i<n; i++) { sum+=(k*i); } printf("%.10f\n",sum*total); }