結果
問題 |
No.884 Eat and Add
|
ユーザー |
|
提出日時 | 2019-09-23 14:46:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 695 ms / 1,000 ms |
コード長 | 378 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,136 KB |
最終ジャッジ日時 | 2024-09-19 04:26:13 |
合計ジャッジ時間 | 4,590 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
if __name__ == "__main__": apples = int(input(), 2) score = 0 while apples != 0: t = apples & 3 if t == 1: score += 1 apples >>= 2 elif t == 3: score += 1 apples += 1 apples >>= 2 elif t == 0: apples >>= 2 else: apples >>= 1 print(score)