結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー MaboyMaboy
提出日時 2021-06-21 16:56:12
言語 Swift
(5.10.0)
結果
TLE  
実行時間 -
コード長 209 bytes
コンパイル時間 4,446 ms
コンパイル使用メモリ 151,444 KB
実行使用メモリ 19,472 KB
最終ジャッジ日時 2023-09-05 01:54:32
合計ジャッジ時間 7,593 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 7 ms
18,868 KB
testcase_01 AC 6 ms
13,824 KB
testcase_02 AC 7 ms
14,140 KB
testcase_03 AC 6 ms
14,112 KB
testcase_04 AC 25 ms
14,772 KB
testcase_05 AC 1,731 ms
14,432 KB
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import Foundation
var n = readLine()!
var c = n.count - n.replacingOccurrences(of: "o", with: "").count
while n.count > 0{
    print(Double(c) / Double(n.count) * 100)
    c -= n.removeFirst() == "o" ? 1 : 0
}
0