結果

問題 No.589 Counting Even
ユーザー wajima_wataruwajima_wataru
提出日時 2018-01-08 15:14:05
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 29 ms / 2,000 ms
コード長 171 bytes
コンパイル時間 232 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-12-23 12:16:05
合計ジャッジ時間 2,357 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

diff #

def get(n):
    if n == 0 or n == 1:
        return 0
    i = 1
    while i <= n:
        i <<= 1
    return 2 * get(n - (i >> 1)) + (i - n - 1)

print(get(int(input())))
0