結果
| 問題 |
No.996 Phnom Penh
|
| コンテスト | |
| ユーザー |
tsunatama5
|
| 提出日時 | 2020-02-21 22:59:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 412 bytes |
| コンパイル時間 | 276 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-10-08 22:43:43 |
| 合計ジャッジ時間 | 2,156 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 21 |
ソースコード
s=input()
n = 0
num = -1
while num < n:
num = n
fi = s
fd = s.find('h')
if fd > -1:
s = s.replace('h', '')
s = s.replace('e', 'h')
n += 1
if s == fi:
n -= 1
s = fi
fi = s
fd = s.find('phnom')
if fd > -1:
s = s.replace('phnom', 'penh', 1)
n += 1
if s == fi:
n -= 1
s = fi
print(n)
tsunatama5