結果
問題 |
No.1292 パタパタ三角形
|
ユーザー |
![]() |
提出日時 | 2020-11-26 14:28:25 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 266 bytes |
コンパイル時間 | 198 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 12,744 KB |
最終ジャッジ日時 | 2024-07-23 20:48:32 |
合計ジャッジ時間 | 2,041 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 3 WA * 4 RE * 7 |
ソースコード
# coding: utf-8 import math, copy, collections from collections import deque s =input() n = len(s) ans = 2 q = deque() q.append(s[0]) for i in range(1,n): if s[i]==q[-1]: q.pop() else: q.append(s[i]) ans += 1 #print(q) print(ans)