結果
| 問題 | No.3757 Happy End |
| コンテスト | |
| ユーザー |
yuuDot
|
| 提出日時 | 2026-10-10 21:18:23 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 39 ms / 2,000 ms |
| + 161µs | |
| コード長 | 204 bytes |
| 記録 | |
| コンパイル時間 | 76 ms |
| コンパイル使用メモリ | 83,304 KB |
| 実行使用メモリ | 72,288 KB |
| 最終ジャッジ日時 | 2026-10-10 21:18:28 |
| 合計ジャッジ時間 | 4,287 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 47 |
ソースコード
n = int(input())
s = list(input())
happy = "HAPPY"
ans = 0
for i in range(5):
if s[n - 5 + i] != happy[i]:
ans += 1
s[n - 5 + i] = happy[i]
print("".join(s).count("HAPPY") + ans - 1)
yuuDot