結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
|
提出日時 | 2018-03-23 22:23:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 88 ms / 2,000 ms |
コード長 | 344 bytes |
コンパイル時間 | 1,338 ms |
コンパイル使用メモリ | 157,528 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-24 21:40:14 |
合計ジャッジ時間 | 3,514 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <bits/stdc++.h>#define MOD 1000000007LLusing namespace std;typedef long long ll;typedef pair<int,int> P;int n;string str;int main(void){cin >> str;n=str.size();int p=0;for(int i=0;i<n;i++){if(str[i]=='o')p++;}for(int i=0;i<n;i++){printf("%.10f\n",(double)p/(n-i)*100.0);if(str[i]=='o')p--;}return 0;}