結果

問題 No.381 名声値を稼ごう Extra
ユーザー lam6er
提出日時 2025-04-16 00:30:02
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 480 bytes
コンパイル時間 225 ms
コンパイル使用メモリ 82,836 KB
実行使用メモリ 52,264 KB
最終ジャッジ日時 2025-04-16 00:31:48
合計ジャッジ時間 9,661 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 TLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD = 1004535809

def main():
    s = input().strip()
    count = 0
    num = list(map(int, s))
    while num:
        remainder = 0
        new_num = []
        for digit in num:
            val = remainder * 10 + digit
            new_digit = val // 2
            remainder = val % 2
            if new_num or new_digit != 0:
                new_num.append(new_digit)
        count += remainder
        num = new_num
    print(count % MOD)

if __name__ == '__main__':
    main()
0