結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー | lll |
提出日時 | 2018-03-23 22:28:34 |
言語 | C++14 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 212 ms / 2,000 ms |
コード長 | 681 bytes |
コンパイル時間 | 797 ms |
コンパイル使用メモリ | 96,988 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-07 03:04:24 |
合計ジャッジ時間 | 3,663 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 2 ms
4,380 KB |
testcase_04 | AC | 4 ms
4,380 KB |
testcase_05 | AC | 23 ms
4,376 KB |
testcase_06 | AC | 106 ms
4,376 KB |
testcase_07 | AC | 212 ms
4,380 KB |
testcase_08 | AC | 179 ms
4,376 KB |
testcase_09 | AC | 163 ms
4,380 KB |
ソースコード
#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; }