結果

問題 No.430 文字列検索
ユーザー shi-moshi-mo
提出日時 2016-10-03 00:38:19
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,229 ms / 2,000 ms
コード長 165 bytes
コンパイル時間 73 ms
コンパイル使用メモリ 11,348 KB
実行使用メモリ 60,108 KB
最終ジャッジ日時 2023-08-27 06:37:30
合計ジャッジ時間 11,768 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,216 KB
testcase_01 AC 860 ms
48,256 KB
testcase_02 AC 768 ms
60,040 KB
testcase_03 AC 554 ms
58,516 KB
testcase_04 AC 77 ms
15,024 KB
testcase_05 AC 77 ms
15,256 KB
testcase_06 AC 78 ms
15,052 KB
testcase_07 AC 77 ms
15,144 KB
testcase_08 AC 75 ms
15,404 KB
testcase_09 AC 77 ms
15,120 KB
testcase_10 AC 95 ms
17,428 KB
testcase_11 AC 1,227 ms
31,568 KB
testcase_12 AC 1,193 ms
28,704 KB
testcase_13 AC 1,229 ms
28,584 KB
testcase_14 AC 1,045 ms
31,172 KB
testcase_15 AC 1,054 ms
45,792 KB
testcase_16 AC 1,007 ms
58,972 KB
testcase_17 AC 1,055 ms
60,108 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

s = gets.chomp
m = gets.to_i
c = m.times.map{ gets.chomp }

n = 0
c.each do |ci|
  si = s
  while /#{ci}/ =~ si
    si = ($& + $')[1..-1]
    n += 1
  end
end
puts n
0