結果
問題 | No.436 ccw |
ユーザー |
![]() |
提出日時 | 2016-10-28 22:37:43 |
言語 | Ruby (3.4.1) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 254 bytes |
コンパイル時間 | 36 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 24,832 KB |
最終ジャッジ日時 | 2024-11-24 05:48:59 |
合計ジャッジ時間 | 17,757 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 19 TLE * 5 |
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.chomp i = s.index("ccw") if i == nil puts 0 exit end first = 0 last = 0 fs = s.dup ls = s.dup while fs.index("ccw") != nil fs[0] = "" first += 1 end while ls.index("ccw") != nil ls[-1] = "" last += 1 end puts [first, last].min