結果

問題 No.430 文字列検索
ユーザー DialBirdDialBird
提出日時 2016-10-20 07:17:28
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,008 ms / 2,000 ms
コード長 167 bytes
コンパイル時間 471 ms
コンパイル使用メモリ 11,464 KB
実行使用メモリ 15,532 KB
最終ジャッジ日時 2023-08-27 06:41:54
合計ジャッジ時間 9,885 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,228 KB
testcase_01 AC 274 ms
15,344 KB
testcase_02 AC 500 ms
15,408 KB
testcase_03 AC 445 ms
15,532 KB
testcase_04 AC 83 ms
15,232 KB
testcase_05 AC 83 ms
14,996 KB
testcase_06 AC 83 ms
15,072 KB
testcase_07 AC 84 ms
15,256 KB
testcase_08 AC 83 ms
15,264 KB
testcase_09 AC 84 ms
15,256 KB
testcase_10 AC 82 ms
15,276 KB
testcase_11 AC 917 ms
15,348 KB
testcase_12 AC 920 ms
15,352 KB
testcase_13 AC 923 ms
15,256 KB
testcase_14 AC 1,008 ms
15,324 KB
testcase_15 AC 971 ms
15,500 KB
testcase_16 AC 825 ms
15,492 KB
testcase_17 AC 828 ms
15,340 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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