結果

問題 No.884 Eat and Add
ユーザー convexineqconvexineq
提出日時 2020-11-01 09:14:02
言語 PyPy3
(7.3.15)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 169 bytes
コンパイル時間 300 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 79,432 KB
最終ジャッジ日時 2023-09-29 11:07:38
合計ジャッジ時間 8,224 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,296 KB
testcase_01 AC 70 ms
71,400 KB
testcase_02 AC 71 ms
71,412 KB
testcase_03 AC 918 ms
78,220 KB
testcase_04 AC 901 ms
78,308 KB
testcase_05 AC 827 ms
78,052 KB
testcase_06 AC 993 ms
78,488 KB
testcase_07 AC 927 ms
77,896 KB
testcase_08 AC 932 ms
78,024 KB
testcase_09 TLE -
testcase_10 AC 72 ms
71,364 KB
testcase_11 AC 71 ms
71,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input(),2)
ans = 0
while N:
    if N&1==0:
        N >>= 1
    elif N&3==1:
        ans += 1
        N >>= 2
    else:
        ans += 1
        N += 1
print(ans)
0