結果
| 問題 |
No.3276 Make Smaller Popcount
|
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-09-19 21:47:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 702 ms / 2,000 ms |
| コード長 | 310 bytes |
| コンパイル時間 | 295 ms |
| コンパイル使用メモリ | 82,776 KB |
| 実行使用メモリ | 77,836 KB |
| 最終ジャッジ日時 | 2025-09-19 21:48:09 |
| 合計ジャッジ時間 | 20,958 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 28 |
ソースコード
T = int(input())
for _ in range(T):
N = int(input())
if(N.bit_count() == 1):
print(-1)
continue
one = []
for i in range(1000):
if(1<<i & N == 0):continue
one.append(i)
if(len(one) == 2):break
print(sum([1<<i for i in range(one[0],one[1])]))
回転