結果
| 問題 |
No.1033 乱数サイ
|
| コンテスト | |
| ユーザー |
aki1
|
| 提出日時 | 2020-05-04 05:15:24 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 343 ms |
| コンパイル使用メモリ | 29,312 KB |
| 実行使用メモリ | 13,888 KB |
| 最終ジャッジ日時 | 2024-06-23 14:43:34 |
| 合計ジャッジ時間 | 5,815 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 WA * 1 TLE * 1 |
ソースコード
#include <stdio.h>
int main(void){
int n, k;
double ans = 0.0;
scanf("%d%d", &n, &k);
int cnt1 = n*k+k, cnt2 = k;
double deno = 1.0/cnt1;
while(cnt1!=0){
while(cnt2!=0){
ans += n*deno;
cnt2--;
}
cnt2 = k;
n--;
cnt1 -= cnt2;
}
printf("%f\n", ans);
return 0;
}
aki1