結果
問題 |
No.1469 programing
|
ユーザー |
![]() |
提出日時 | 2021-11-15 00:54:11 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 368 bytes |
コンパイル時間 | 254 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 317,056 KB |
最終ジャッジ日時 | 2024-11-30 12:13:17 |
合計ジャッジ時間 | 21,350 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 TLE * 4 |
ソースコード
def main(): from sys import stdin input=stdin.readline s = input()[:-1] n = len(s) ans = '' flag = False for i in range(n-1): if flag: flag = False continue if s[i] == s[i+1]: ans += s[i] flag = True else: ans += s[i] if n == 1: ans = s else: if s[-1] != s[-2]: ans += s[-1] print(ans) main()