結果

問題 No.1469 programing
ユーザー だれ
提出日時 2021-04-09 21:23:00
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 241 bytes
コンパイル時間 412 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 25,556 KB
最終ジャッジ日時 2024-06-25 03:56:52
合計ジャッジ時間 11,537 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
n = len(s)
if n == 1:
    print(s)
    exit()
i = 0
ans = ""
while i < n - 1:
    if s[i] == s[i + 1]:
        ans += s[i]
        i += 2
    else:
        ans += s[i]
        i += 1
if s[-2] != s[-1]:
    ans += s[-1]
print(ans)
0