結果
問題 | No.667 Mice's Luck(ネズミ達の運) |
ユーザー | troro_kelp |
提出日時 | 2018-03-23 22:36:56 |
言語 | C++11 (gcc 11.4.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 463 bytes |
コンパイル時間 | 526 ms |
コンパイル使用メモリ | 69,656 KB |
実行使用メモリ | 8,752 KB |
最終ジャッジ日時 | 2023-09-07 03:08:54 |
合計ジャッジ時間 | 5,737 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,376 KB |
testcase_02 | AC | 2 ms
4,384 KB |
testcase_03 | AC | 2 ms
4,380 KB |
testcase_04 | AC | 4 ms
4,380 KB |
testcase_05 | AC | 65 ms
4,380 KB |
testcase_06 | AC | 1,108 ms
4,380 KB |
testcase_07 | TLE | - |
testcase_08 | -- | - |
testcase_09 | -- | - |
ソースコード
#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; }