結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー takeytakey
提出日時 2018-03-24 13:25:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 276 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 9,328 KB
最終ジャッジ日時 2023-09-07 08:47:44
合計ジャッジ時間 3,817 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
9,064 KB
testcase_01 AC 21 ms
8,840 KB
testcase_02 AC 20 ms
8,988 KB
testcase_03 AC 21 ms
9,088 KB
testcase_04 AC 23 ms
9,156 KB
testcase_05 AC 48 ms
9,004 KB
testcase_06 AC 151 ms
9,132 KB
testcase_07 AC 276 ms
9,104 KB
testcase_08 AC 195 ms
8,976 KB
testcase_09 AC 195 ms
9,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#-*- coding:utf-8 -*-
from decimal import *

if __name__ == "__main__":
	getcontext().prec = 28
	S = input()
	safe = 0
	out  = 0
	for s in S:
		if s == "o":
			safe += 1
		else:
			out += 1
	for i in range(len(S)):
		ans = Decimal(safe/(safe+out))
		print(ans*100)
		if S[i] == "o":
			safe -= 1
		else:
			out -= 1
0