結果
問題 |
No.1005 BOT対策
|
ユーザー |
![]() |
提出日時 | 2020-03-06 23:51:49 |
言語 | Ruby (3.4.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 97 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 17,664 KB |
最終ジャッジ日時 | 2024-10-14 10:53:12 |
合計ジャッジ時間 | 3,924 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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