結果

問題 No.1298 OR XOR
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-02-15 11:00:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 87,228 KB
実行使用メモリ 71,676 KB
最終ジャッジ日時 2023-09-30 04:49:04
合計ジャッジ時間 2,445 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,456 KB
testcase_01 AC 77 ms
71,372 KB
testcase_02 AC 76 ms
71,260 KB
testcase_03 AC 75 ms
71,348 KB
testcase_04 AC 76 ms
71,128 KB
testcase_05 AC 76 ms
71,668 KB
testcase_06 AC 76 ms
71,476 KB
testcase_07 AC 76 ms
71,460 KB
testcase_08 AC 76 ms
71,676 KB
testcase_09 AC 75 ms
71,380 KB
testcase_10 AC 75 ms
71,512 KB
testcase_11 AC 75 ms
71,328 KB
testcase_12 AC 76 ms
71,180 KB
testcase_13 AC 75 ms
71,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
ary=[]
for i in range(31):
  if (n>>i)&1:ary.append(i)
if len(ary)==1:
  print(-1,-1,-1)
else:
  a=n^(1<<ary[0])
  b=n^(1<<ary[1])
  c=a^b
  print(a,b,c)
0