結果

問題 No.667 Mice's Luck(ネズミ達の運)
ユーザー 👑 horiesinitihoriesiniti
提出日時 2018-03-27 07:37:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 401 ms / 2,000 ms
コード長 135 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 11,452 KB
実行使用メモリ 23,740 KB
最終ジャッジ日時 2023-09-07 18:54:53
合計ジャッジ時間 3,878 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,244 KB
testcase_01 AC 82 ms
15,168 KB
testcase_02 AC 80 ms
15,296 KB
testcase_03 AC 82 ms
15,164 KB
testcase_04 AC 86 ms
15,160 KB
testcase_05 AC 120 ms
15,884 KB
testcase_06 AC 240 ms
19,624 KB
testcase_07 AC 401 ms
23,740 KB
testcase_08 AC 257 ms
22,684 KB
testcase_09 AC 246 ms
22,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

x=gets.chomp
ok=x.chars.count{|e|
	e=="o"
}
no=x.size-ok
x.chars{|e|
	puts ok/(ok+no+0.0)*100.0
	if e=="o"
		ok-=1
	else
		no-=1
	end
}
0