結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー | lll |
提出日時 | 2018-03-23 22:28:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 214 ms / 2,000 ms |
コード長 | 681 bytes |
コンパイル時間 | 829 ms |
コンパイル使用メモリ | 99,240 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-24 21:45:37 |
合計ジャッジ時間 | 3,374 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #include <iomanip> using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); string s; cin >> s; int len = s.size(); int o_cnt = 0; for (auto c : s) { if (c == 'o') o_cnt++; } cout << fixed; for (auto c : s) { cout << setprecision(8) << ((o_cnt * 1.0 / len) * 100.0) << endl; if (c == 'o') { o_cnt--; } len--; } return 0; }