結果

問題 No.1469 programing
ユーザー だれだれ
提出日時 2021-04-09 21:23:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 241 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 22,292 KB
最終ジャッジ日時 2023-09-07 09:40:01
合計ジャッジ時間 11,192 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 13 ms
12,220 KB
testcase_01 AC 12 ms
7,772 KB
testcase_02 AC 12 ms
7,872 KB
testcase_03 AC 13 ms
7,712 KB
testcase_04 AC 12 ms
7,784 KB
testcase_05 AC 13 ms
7,772 KB
testcase_06 AC 14 ms
7,800 KB
testcase_07 AC 14 ms
7,872 KB
testcase_08 AC 117 ms
8,384 KB
testcase_09 AC 190 ms
8,288 KB
testcase_10 AC 154 ms
8,404 KB
testcase_11 AC 1,180 ms
8,832 KB
testcase_12 AC 628 ms
8,448 KB
testcase_13 AC 12 ms
8,124 KB
testcase_14 AC 1,826 ms
8,812 KB
testcase_15 AC 377 ms
8,560 KB
testcase_16 AC 972 ms
9,128 KB
testcase_17 TLE -
権限があれば一括ダウンロードができます

ソースコード

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