結果
問題 |
No.3015 右に寄せろ!
|
ユーザー |
|
提出日時 | 2025-02-08 18:20:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 219 bytes |
コンパイル時間 | 552 ms |
コンパイル使用メモリ | 82,836 KB |
実行使用メモリ | 187,496 KB |
最終ジャッジ日時 | 2025-02-08 18:20:52 |
合計ジャッジ時間 | 4,594 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 27 |
ソースコード
s=[*input()] while s and s[-1]=='1': s.pop() ans=z=0 while s: while s and s[-1]=='0': s.pop() z+=1 if s[-2:]==[*'11']: ans+=z s.pop();s.pop() elif s and s[-1]=='1': z=0 s.pop() print(ans)