結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-14 20:03:35 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 88 ms / 2,000 ms |
| コード長 | 343 bytes |
| コンパイル時間 | 4,983 ms |
| コンパイル使用メモリ | 191,024 KB |
| 最終ジャッジ日時 | 2025-01-05 13:19:18 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#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("%.7f\n", double(nSafe*100)/double(n));
--n; nSafe -= str[i] == 'o';
}
return 0;
}