結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
|
提出日時 | 2019-07-31 22:52:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 384 bytes |
コンパイル時間 | 1,825 ms |
コンパイル使用メモリ | 193,796 KB |
最終ジャッジ日時 | 2025-01-07 10:21:18 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 8 |
ソースコード
#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 / double(o+x) << endl; if (c == 'o') o--; else x--; } return 0; }