結果
| 問題 | 
                            No.1372 Median of Submasks
                             | 
                    
| コンテスト | |
| ユーザー | 
                             rlangevin
                         | 
                    
| 提出日時 | 2024-06-27 08:57:29 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 223 bytes | 
| コンパイル時間 | 245 ms | 
| コンパイル使用メモリ | 82,560 KB | 
| 実行使用メモリ | 54,064 KB | 
| 最終ジャッジ日時 | 2024-06-27 08:57:31 | 
| 合計ジャッジ時間 | 2,213 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| 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