結果
| 問題 | No.1372 Median of Submasks |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-05 21:34:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 254 bytes |
| 記録 | |
| コンパイル時間 | 123 ms |
| コンパイル使用メモリ | 84,736 KB |
| 実行使用メモリ | 423,388 KB |
| 最終ジャッジ日時 | 2026-03-23 20:05:48 |
| 合計ジャッジ時間 | 26,249 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 TLE * 8 |
ソースコード
n = int(input())
l = [1 << i for i in range(60) if 1 << i & n]
ans = []
for b in range(1, 1 << len(l)):
cnt = 0
for i in range(len(l)):
if 1 << i & b:
cnt += l[i]
ans.append(cnt)
print(sorted(ans)[(len(ans) + 1) // 2 - 1])