結果
問題 |
No.381 名声値を稼ごう Extra
|
ユーザー |
![]() |
提出日時 | 2025-04-16 00:31:38 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 528 bytes |
コンパイル時間 | 342 ms |
コンパイル使用メモリ | 81,260 KB |
実行使用メモリ | 71,504 KB |
最終ジャッジ日時 | 2025-04-16 00:32:47 |
合計ジャッジ時間 | 772 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 RE * 1 |
ソースコード
def main(): N = input().strip() n = int(N) bin_str = bin(n)[2:] L = len(bin_str) imos = [0] * (L + 2) for i in range(L): if bin_str[i] == '1': end = i + 1 imos[0] += 1 if end <= L + 1: imos[end] -= 1 max_count = 0 current = 0 for k in range(L + 1): current += imos[k] if current > max_count: max_count = current print(max_count % 1004535809) if __name__ == "__main__": main()