結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー |
![]() |
提出日時 | 2018-03-24 11:06:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 264 ms / 2,000 ms |
コード長 | 300 bytes |
コンパイル時間 | 1,646 ms |
コンパイル使用メモリ | 167,688 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 02:44:37 |
合計ジャッジ時間 | 4,439 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main() {string s;cin >> s;int n = s.size(), ok = count(s.begin(), s.end(), 'o'), ng = n - ok;for (int i = 0; i < n; i++) {cout << fixed << setprecision(17) << 100.0 * ok / (n - i) << endl;if (s[i] == 'o') {ok--;}}return 0;}