結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2018-07-23 19:22:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 229 ms / 2,000 ms |
コード長 | 487 bytes |
コンパイル時間 | 791 ms |
コンパイル使用メモリ | 64,904 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-30 01:50:36 |
合計ジャッジ時間 | 3,933 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
#include <fstream> #include <iostream> #include <string> #include <iomanip> int main() { //std::ifstream inf("Text.txt"); std::cin.rdbuf(inf.rdbuf()); std::string S; std::cin >> S; int L = static_cast<int>(S.length()); double T = 0; for (int i = 0; i < L; i++) { if (S[i] == 'o') { T++; } } std::cout << std::fixed; for (int i = 0; i < L; i++) { std::cout << std::setprecision(7) << T / (L - i) * 100 << std::endl; if (S[i] == 'o') { T--; } } return 0; }