結果

問題 No.1469 programing
ユーザー lam6er
提出日時 2025-03-20 18:44:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 453 ms / 3,000 ms
コード長 219 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 82,260 KB
実行使用メモリ 301,260 KB
最終ジャッジ日時 2025-03-20 18:44:16
合計ジャッジ時間 2,783 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input().strip()
if not s:
    print('')
else:
    result = [s[0]]
    prev_char = s[0]
    for c in s[1:]:
        if c != prev_char:
            result.append(c)
            prev_char = c
    print(''.join(result))
0