結果

問題 No.381 名声値を稼ごう Extra
ユーザー maspymaspy
提出日時 2020-03-17 13:16:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 412 bytes
コンパイル時間 111 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-05-07 20:45:06
合計ジャッジ時間 497 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,496 KB
testcase_01 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3.8
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def to_int(word):
    L = len(word)
    if len(word) < 10000:
        return int(word)
    mid = L // 2
    n1 = to_int(word[:mid])
    n2 = to_int(word[mid:])
    return pow(10, L - mid) * n1 + n2


N = to_int(read().rstrip())
answer = bin(N).count('1')
print(answer)
0