結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー maspymaspy
提出日時 2020-01-21 13:58:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 169 ms / 2,000 ms
コード長 304 bytes
コンパイル時間 139 ms
コンパイル使用メモリ 10,628 KB
実行使用メモリ 22,376 KB
最終ジャッジ日時 2023-09-19 03:34:40
合計ジャッジ時間 3,550 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,836 KB
testcase_01 AC 15 ms
7,764 KB
testcase_02 AC 16 ms
7,904 KB
testcase_03 AC 15 ms
7,824 KB
testcase_04 AC 17 ms
8,164 KB
testcase_05 AC 31 ms
9,632 KB
testcase_06 AC 90 ms
15,052 KB
testcase_07 AC 169 ms
22,376 KB
testcase_08 AC 88 ms
19,716 KB
testcase_09 AC 76 ms
19,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

S = read().rstrip()

o = S.count(b'o')
rest = len(S)

prob = []
for s in S:
    prob.append(o/rest*100)
    if s == ord('o'):
        o -= 1
    rest -= 1

print('\n'.join(map(str,prob)))
0