結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー xuelei
提出日時 2018-07-28 12:02:00
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 226 ms / 2,000 ms
コード長 322 bytes
コンパイル時間 574 ms
コンパイル使用メモリ 65,100 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-05 18:21:42
合計ジャッジ時間 3,056 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;

int main(){
  string s;
  cin >> s;
  int o=count(s.begin(),s.end(),'o');
  int x=s.size()-o;
  for(int i=0;i<s.size();i++){
    cout << setprecision(10) << (double)o/(x+o)*100 << endl;
    if(s[i]=='o')o--;
    else x--;
  }
  return 0;
}
0