結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
![]() |
提出日時 | 2018-03-26 00:55:59 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 238 ms / 2,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 1,321 ms |
コンパイル使用メモリ | 158,956 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 06:25:02 |
合計ジャッジ時間 | 3,927 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) FOR(i,0,n) #define pb emplace_back typedef long long ll; typedef pair<int,int> pint; int main(){ string s; cin>>s; double cnt=0; rep(i,s.size())if(s[i]=='o') cnt+=1; int n=s.size(); double m=n; rep(i,n){ cout<<fixed<<setprecision(12)<<cnt/m*100<<endl; cnt=cnt-(s[i]=='o'); m=m-1; } return 0; }