結果
| 問題 |
No.996 Phnom Penh
|
| コンテスト | |
| ユーザー |
wonda_t_coffee
|
| 提出日時 | 2020-02-21 22:38:27 |
| 言語 | Ruby (3.4.1) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 226 bytes |
| コンパイル時間 | 310 ms |
| コンパイル使用メモリ | 7,680 KB |
| 実行使用メモリ | 87,644 KB |
| 最終ジャッジ日時 | 2024-10-08 22:05:32 |
| 合計ジャッジ時間 | 6,519 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 TLE * 1 -- * 3 |
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.chomp
ans = 0
while true
f = false
t = s.gsub("phnom", "penh")
f |= s != t
ans += s.size - t.size
u = t.gsub("h", "").gsub("e", "h")
f |= t != u
break unless f
ans += 1
s = u.clone
end
puts ans
wonda_t_coffee