結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー liveforever753liveforever753
提出日時 2018-04-09 09:44:08
言語 Python2
(2.7.18)
結果
AC  
実行時間 101 ms / 2,000 ms
コード長 715 bytes
コンパイル時間 992 ms
コンパイル使用メモリ 6,596 KB
実行使用メモリ 9,172 KB
最終ジャッジ日時 2023-09-09 03:23:03
合計ジャッジ時間 2,554 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,992 KB
testcase_01 AC 11 ms
5,964 KB
testcase_02 AC 11 ms
5,836 KB
testcase_03 AC 12 ms
5,992 KB
testcase_04 AC 13 ms
5,940 KB
testcase_05 AC 21 ms
6,144 KB
testcase_06 AC 57 ms
7,416 KB
testcase_07 AC 101 ms
9,076 KB
testcase_08 AC 88 ms
9,172 KB
testcase_09 AC 84 ms
9,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python
# coding : utf-8

def retTrapCheck(argStr):
    return retTrap

def main():
    #print "input box num "
    
    box         = raw_input()
    mouseNum    = int(len(box))
    percent     = 0

    safe        = box.count("o")
    trap        = box.count("x")

    
    for i in range(mouseNum):
        percent = float(safe)/float(mouseNum-i) * 100.
        if box[i] == "o":
            safe -= 1
            if safe < 0:
                safe = 0
        else:
            trap -= 1
            if trap < 0:
                trap = 0
        
        #print "box num      >> ",i
        #print "percent      >> ",percent
        print percent

    return

if __name__ == "__main__":
    main()
0