結果
問題 |
No.3015 右に寄せろ!
|
ユーザー |
![]() |
提出日時 | 2025-01-25 14:18:22 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 499 bytes |
コンパイル時間 | 215 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 78,336 KB |
最終ジャッジ日時 | 2025-01-25 23:15:22 |
合計ジャッジ時間 | 3,173 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge10 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 27 |
ソースコード
def readints(): return list(map(int, input().split())) def deep_recursion(): import sys import pypyjit # type: ignore sys.setrecursionlimit(550000) pypyjit.set_param('max_unroll_recursion=-1') def main(): S = input() n = len(S) ans = 0 zero = 0 ones = 0 for i in range(n-1, -1, -1): if S[i] == '1': ones += 1 if ones == 2: ones = 0 ans += zero else: zero += 1 print(ans) if __name__ == '__main__': # deep_recursion() main()