結果

問題 No.430 文字列検索
ユーザー DialBirdDialBird
提出日時 2016-10-20 09:26:22
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,015 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 11,444 KB
実行使用メモリ 15,492 KB
最終ジャッジ日時 2023-08-27 02:37:10
合計ジャッジ時間 9,785 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
15,056 KB
testcase_01 AC 274 ms
15,444 KB
testcase_02 AC 503 ms
15,440 KB
testcase_03 AC 449 ms
15,280 KB
testcase_04 AC 84 ms
15,076 KB
testcase_05 AC 83 ms
15,128 KB
testcase_06 AC 84 ms
15,152 KB
testcase_07 AC 83 ms
15,256 KB
testcase_08 AC 84 ms
15,316 KB
testcase_09 AC 82 ms
15,132 KB
testcase_10 AC 83 ms
15,240 KB
testcase_11 AC 943 ms
15,492 KB
testcase_12 AC 927 ms
15,356 KB
testcase_13 AC 929 ms
15,320 KB
testcase_14 AC 1,015 ms
15,296 KB
testcase_15 AC 980 ms
15,272 KB
testcase_16 AC 829 ms
15,208 KB
testcase_17 AC 835 ms
15,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

S = gets.chomp
M = gets.to_i

count = 0
M.times do
  str = gets.chomp
  i = 0
  while i = S.index(str, i)
    count += 1
    i += 1
  end
end
puts count
0