結果

問題 No.1298 OR XOR
ユーザー mkawa2mkawa2
提出日時 2020-11-27 21:28:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 1,118 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 11,080 KB
実行使用メモリ 8,776 KB
最終ジャッジ日時 2023-10-01 04:43:19
合計ジャッジ時間 1,416 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,592 KB
testcase_01 AC 20 ms
8,604 KB
testcase_02 AC 19 ms
8,740 KB
testcase_03 AC 19 ms
8,588 KB
testcase_04 AC 19 ms
8,728 KB
testcase_05 AC 19 ms
8,628 KB
testcase_06 AC 19 ms
8,672 KB
testcase_07 AC 19 ms
8,596 KB
testcase_08 AC 20 ms
8,748 KB
testcase_09 AC 19 ms
8,596 KB
testcase_10 AC 19 ms
8,776 KB
testcase_11 AC 19 ms
8,672 KB
testcase_12 AC 19 ms
8,600 KB
testcase_13 AC 19 ms
8,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# from operator import itemgetter
# from itertools import *
# from bisect import *
from collections import *
from heapq import *
import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def MI(): return map(int, sys.stdin.buffer.readline().split())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MI1(): return map(int1, sys.stdin.buffer.readline().split())
def LI1(): return list(map(int1, sys.stdin.buffer.readline().split()))
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()
def inval(ni, nj, h, w):
    if ni < 0 or ni >= h or nj < 0 or nj >= w: return True
    return False
dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
inf = 10**16
md = 10 ** 9 + 7

n=II()
s=format(n,"b")
if s.count("1")==1:
    print(-1,-1,-1)
    exit()

a=n
b=1<<n.bit_length()-1
c=a-b

# print(a|b,b|c,c|a,a^b^c)
print(a,b,c)
0