結果
| 問題 | No.1372 Median of Submasks |
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-06-27 08:57:29 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 223 bytes |
| 記録 | |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 51,968 KB |
| 最終ジャッジ日時 | 2026-03-14 22:31:01 |
| 合計ジャッジ時間 | 1,837 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 10 WA * 14 |
ソースコード
def popcount(n):
cnt = 0
while n:
cnt += n & 1
n >>= 1
return cnt
N = int(input())
c = popcount(N) // 2
for i in range(65):
if (N >> i) & 1 and c:
N -= 1 << i
c -= 1
print(N)
rlangevin