結果
| 問題 | No.436 ccw |
| コンテスト | |
| ユーザー |
harhogefoo
|
| 提出日時 | 2016-10-28 22:37:43 |
| 言語 | Ruby (4.0.2) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 254 bytes |
| 記録 | |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 8,960 KB |
| 実行使用メモリ | 14,848 KB |
| 最終ジャッジ日時 | 2026-05-18 04:05:09 |
| 合計ジャッジ時間 | 7,577 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 19 TLE * 1 -- * 4 |
コンパイルメッセージ
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
harhogefoo