結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
|
提出日時 | 2018-06-14 20:00:01 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 340 bytes |
コンパイル時間 | 2,330 ms |
コンパイル使用メモリ | 192,344 KB |
最終ジャッジ日時 | 2025-01-05 13:10:51 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 8 |
ソースコード
#include <bits/stdc++.h> using namespace std; int N; string str; int main(){ cin >> str; N = str.size(); int nSafe = 0, n = N; for (int i = 0; i < N; ++i) nSafe += str[i] == 'o'; for (int i = 0; i < N; ++i){ printf("%.10f\n", double(nSafe)/double(n)); --n; nSafe -= str[i] == 'o'; } return 0; }