結果

問題 No.1298 OR XOR
ユーザー kazu_eykazu_ey
提出日時 2020-11-27 21:48:07
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 352 bytes
コンパイル時間 614 ms
コンパイル使用メモリ 10,804 KB
実行使用メモリ 160,984 KB
最終ジャッジ日時 2023-10-01 05:17:48
合計ジャッジ時間 5,459 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
12,244 KB
testcase_01 AC 16 ms
7,740 KB
testcase_02 AC 15 ms
7,796 KB
testcase_03 AC 16 ms
7,824 KB
testcase_04 AC 1,496 ms
80,244 KB
testcase_05 TLE -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
if n==1:
    print(-1,-1,-1,sep=" ")
elif n%2!=0:
    print(n,n-1,1,sep=" ")
else:
    lst=[2**i for i in range(1,n+1)]
    if n in lst:
        print(-1,-1,-1,sep=" ")
    else:
        for i in range(n):
            if n>>i&1:
                t=i
                break
        n2=n^(1<<t)
        n3=1<<t
        print(n,n2,n3,sep=" ")
0