結果
| 問題 |
No.1469 programing
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-17 22:44:22 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 310 ms / 3,000 ms |
| コード長 | 248 bytes |
| コンパイル時間 | 185 ms |
| コンパイル使用メモリ | 82,336 KB |
| 実行使用メモリ | 260,564 KB |
| 最終ジャッジ日時 | 2024-06-25 12:04:02 |
| 合計ジャッジ時間 | 3,248 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
S = input()
n = len(S)
ANS = []
i = 0
while i < n:
if i == n - 1:
ANS.append(S[i])
i += 1
elif S[i] == S[i + 1]:
ANS.append(S[i])
i += 2
else:
ANS.append(S[i])
i += 1
print(''.join(ANS))