結果

問題 No.1469 programing
ユーザー kept1994kept1994
提出日時 2021-08-25 20:07:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,788 ms / 3,000 ms
コード長 253 bytes
コンパイル時間 103 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 100,896 KB
最終ジャッジ日時 2024-04-28 11:40:49
合計ジャッジ時間 4,957 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
10,624 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 26 ms
10,624 KB
testcase_03 AC 26 ms
10,624 KB
testcase_04 AC 27 ms
10,624 KB
testcase_05 AC 27 ms
10,624 KB
testcase_06 AC 27 ms
10,624 KB
testcase_07 AC 28 ms
10,624 KB
testcase_08 AC 70 ms
13,056 KB
testcase_09 AC 93 ms
13,808 KB
testcase_10 AC 82 ms
13,696 KB
testcase_11 AC 155 ms
18,284 KB
testcase_12 AC 123 ms
15,872 KB
testcase_13 AC 27 ms
10,624 KB
testcase_14 AC 205 ms
20,400 KB
testcase_15 AC 137 ms
15,920 KB
testcase_16 AC 203 ms
19,572 KB
testcase_17 AC 1,788 ms
100,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys

def main():
    S = input()
    ans = [S[0]]
    for i in range(len(S) - 1):
        if S[i] == S[i + 1]:
            continue
        ans.append(S[i + 1])
    print(*ans, sep="")

if __name__ == '__main__':
    main()
0