結果
| 問題 | 
                            No.1005 BOT対策
                             | 
                    
| コンテスト | |
| ユーザー | 
                             995himada
                         | 
                    
| 提出日時 | 2020-03-06 22:42:38 | 
| 言語 | Ruby  (3.4.1)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 242 bytes | 
| コンパイル時間 | 62 ms | 
| コンパイル使用メモリ | 7,552 KB | 
| 実行使用メモリ | 17,664 KB | 
| 最終ジャッジ日時 | 2024-10-14 10:49:05 | 
| 合計ジャッジ時間 | 3,944 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 1 TLE * 1 -- * 25 | 
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.chomp.split('')
t = gets.chomp.split('')
i = 0
ans = 0
while i <= (s.size - t.size)
  if s[i] == t[0]
    # binding.pry
    if s[i, t.size] == t
      ans += 1
      i += (t.size - 2)
    end
  end
  i += 1
end
# binding.pry
puts ans
            
            
            
        
            
995himada