結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー hanorverhanorver
提出日時 2018-03-23 22:30:36
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 197 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 302 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 8,220 KB
最終ジャッジ日時 2023-09-07 03:06:13
合計ジャッジ時間 2,972 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,924 KB
testcase_01 AC 15 ms
7,868 KB
testcase_02 AC 15 ms
7,808 KB
testcase_03 AC 15 ms
7,964 KB
testcase_04 AC 17 ms
7,860 KB
testcase_05 AC 34 ms
7,820 KB
testcase_06 AC 106 ms
8,112 KB
testcase_07 AC 197 ms
8,128 KB
testcase_08 AC 114 ms
8,088 KB
testcase_09 AC 114 ms
8,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s=input()
safe_pos = s.count("o")
trap_pos = s.count("x")

for i, room in enumerate(s):
    print(safe_pos / (safe_pos + trap_pos) * 100)
    if room == "o":
        safe_pos -= 1
    else:
        trap_pos -= 1
0