結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2018-03-23 22:36:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 566 ms |
コンパイル使用メモリ | 68,524 KB |
実行使用メモリ | 9,088 KB |
最終ジャッジ日時 | 2024-06-24 21:50:33 |
合計ジャッジ時間 | 6,032 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 7 TLE * 1 -- * 2 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <iomanip> using namespace std; string s; int main() { cin >> s; string str = s; for (int i = 0; i < s.size(); ++i) { int can = 0, cannot = 0; for (int j = 0; j < str.size(); ++j) { if (str[j] == 'o') can++; else if (str[j] == 'x') cannot++; } cout << fixed << (double)can / (double)str.size()*100<< endl; str = str.substr(1, str.size() - 1); } return 0; }