結果
| 問題 |
No.667 Mice's Luck(ネズミ達の運)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-31 22:53:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 213 ms / 2,000 ms |
| コード長 | 388 bytes |
| コンパイル時間 | 2,056 ms |
| コンパイル使用メモリ | 194,476 KB |
| 最終ジャッジ日時 | 2025-01-07 10:21:27 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
int n = s.size();
int o, x;
o = x = 0;
for (char c : s) {
if (c == 'o') o++;
else x++;
}
cout << fixed;
for (char c : s) {
cout << o*100 / double(o+x) << endl;
if (c == 'o') o--;
else x--;
}
return 0;
}