結果

問題 No.1469 programing
ユーザー だれだれ
提出日時 2021-04-09 21:22:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 206 bytes
コンパイル時間 259 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 9,224 KB
最終ジャッジ日時 2023-09-07 09:37:21
合計ジャッジ時間 11,832 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,964 KB
testcase_01 AC 16 ms
7,784 KB
testcase_02 AC 16 ms
7,784 KB
testcase_03 AC 16 ms
7,904 KB
testcase_04 AC 16 ms
7,916 KB
testcase_05 AC 17 ms
7,756 KB
testcase_06 AC 17 ms
7,844 KB
testcase_07 AC 18 ms
7,772 KB
testcase_08 AC 139 ms
8,292 KB
testcase_09 AC 220 ms
8,344 KB
testcase_10 AC 184 ms
8,360 KB
testcase_11 AC 1,368 ms
8,816 KB
testcase_12 AC 727 ms
8,432 KB
testcase_13 RE -
testcase_14 AC 2,114 ms
8,932 KB
testcase_15 AC 452 ms
8,716 KB
testcase_16 AC 1,112 ms
9,224 KB
testcase_17 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
n = len(s)
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