結果

問題 No.291 黒い文字列
ユーザー LeonardoneLeonardone
提出日時 2015-10-16 23:23:58
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 82 ms
コンパイル使用メモリ 11,188 KB
実行使用メモリ 15,348 KB
最終ジャッジ日時 2023-09-29 01:51:48
合計ジャッジ時間 3,903 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
15,240 KB
testcase_01 AC 83 ms
15,104 KB
testcase_02 AC 83 ms
15,116 KB
testcase_03 WA -
testcase_04 AC 83 ms
15,144 KB
testcase_05 AC 85 ms
15,204 KB
testcase_06 AC 83 ms
15,236 KB
testcase_07 AC 84 ms
15,232 KB
testcase_08 AC 84 ms
15,096 KB
testcase_09 AC 84 ms
15,292 KB
testcase_10 WA -
testcase_11 AC 86 ms
15,064 KB
testcase_12 WA -
testcase_13 AC 85 ms
15,200 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 84 ms
15,116 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 84 ms
15,036 KB
testcase_27 AC 84 ms
15,044 KB
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

#! ruby
# Try yukicoder
# author: Leornadone @ NEETSDKASU

S = gets.chomp

count = 0
i = 0

S.each_char do |c|
	if "KUROI"[i] == c || "?" == c
		i += 1
		if i == 5
			count += 1
			i = 0
		end
	end
end

puts count
0