結果
問題 |
No.667 Mice's Luck(ネズミ達の運)
|
ユーザー |
![]() |
提出日時 | 2025-03-20 19:00:04 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 135 ms / 2,000 ms |
コード長 | 352 bytes |
コンパイル時間 | 188 ms |
コンパイル使用メモリ | 82,616 KB |
実行使用メモリ | 77,056 KB |
最終ジャッジ日時 | 2025-03-20 19:01:03 |
合計ジャッジ時間 | 3,315 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 10 |
ソースコード
S = input().strip() o_count = S.count('o') x_count = len(S) - o_count for c in S: total = o_count + x_count probability = (o_count / total) * 100 if total != 0 else 0.0 # Ensure that even integers are printed with decimal places print("{0:.12f}".format(probability)) if c == 'o': o_count -= 1 else: x_count -= 1