結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2022-08-23 17:02:04 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 215 ms / 2,000 ms |
コード長 | 380 bytes |
コンパイル時間 | 1,624 ms |
コンパイル使用メモリ | 193,816 KB |
最終ジャッジ日時 | 2025-01-31 03:10:20 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ string S; cin>>S; int N = S.size(); int count = 0; for(int i=0;i<N;i++) count += (S[i] == 'o'); for(int i=0;i<N;i++){ if(count == 0){ cout<<0<<endl; continue; } cout<<fixed<<setprecision(15); cout<<count*100.0/(N-i)<<endl; count -= (S[i] == 'o'); } }