結果

問題 No.430 文字列検索
ユーザー DialBird
提出日時 2016-10-20 07:17:28
言語 Ruby
(3.4.1)
結果
AC  
実行時間 854 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,544 KB
最終ジャッジ日時 2024-11-10 00:11:09
合計ジャッジ時間 7,836 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 14
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

S = gets.chomp
M = gets.to_i

count = 0
arr = $stdin.read.split("\n")
arr.each do |e|
  i = 0
  while i = S.index(e, i)
    count += 1
    i += 1
  end
end
puts count
0