結果

問題 No.884 Eat and Add
ユーザー torikuminotorikumino
提出日時 2019-09-21 16:15:04
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
TLE  
実行時間 -
コード長 122 bytes
コンパイル時間 107 ms
コンパイル使用メモリ 11,876 KB
実行使用メモリ 10,456 KB
最終ジャッジ日時 2023-10-19 04:34:48
合計ジャッジ時間 8,154 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
10,068 KB
testcase_01 AC 33 ms
10,068 KB
testcase_02 AC 29 ms
10,068 KB
testcase_03 TLE -
testcase_04 TLE -
testcase_05 AC 983 ms
10,440 KB
testcase_06 TLE -
testcase_07 AC 916 ms
10,440 KB
testcase_08 AC 908 ms
10,440 KB
testcase_09 TLE -
testcase_10 AC 30 ms
10,068 KB
testcase_11 AC 29 ms
10,068 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input(), 2)
r = 0
while n != 0:
    if n&1:
        if n&2:
            n += 1
        r += 1
    n >>= 1
print(r)
0