結果

問題 No.381 名声値を稼ごう Extra
ユーザー maspymaspy
提出日時 2020-03-17 13:03:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 420 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 9,860 KB
最終ジャッジ日時 2023-08-20 14:17:20
合計ジャッジ時間 838 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
7,864 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 = sum(map(int, bin(N)[2:]))
print(answer)
0