結果
| 問題 | No.1298 OR XOR |
| コンテスト | |
| ユーザー |
proribone
|
| 提出日時 | 2020-11-27 21:27:27 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 248 bytes |
| 記録 | |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 85,036 KB |
| 実行使用メモリ | 52,096 KB |
| 最終ジャッジ日時 | 2026-04-03 16:33:46 |
| 合計ジャッジ時間 | 2,248 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 |
ソースコード
def popcount(x):
s=set()
cnt=0
while(x>0):
if x%2:
s.add(cnt)
x//=2
cnt+=1
return s
N=int(input())
s=popcount(N)
if len(s)==1:
print(-1,-1,-1)
else:
t=s.pop()
print(N,1<<t,N-(1<<t))
proribone