結果

問題 No.1298 OR XOR
ユーザー marroncastlemarroncastle
提出日時 2020-11-27 21:27:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 74 ms / 2,000 ms
コード長 159 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 86,672 KB
実行使用メモリ 71,400 KB
最終ジャッジ日時 2023-10-01 04:42:38
合計ジャッジ時間 2,497 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,120 KB
testcase_01 AC 72 ms
71,084 KB
testcase_02 AC 70 ms
71,376 KB
testcase_03 AC 71 ms
71,200 KB
testcase_04 AC 71 ms
71,152 KB
testcase_05 AC 71 ms
71,100 KB
testcase_06 AC 70 ms
70,916 KB
testcase_07 AC 72 ms
71,176 KB
testcase_08 AC 74 ms
71,172 KB
testcase_09 AC 71 ms
71,192 KB
testcase_10 AC 72 ms
71,148 KB
testcase_11 AC 71 ms
71,068 KB
testcase_12 AC 73 ms
71,192 KB
testcase_13 AC 72 ms
71,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = N
p = 0
while True:
  if (N>>p)%2==1:
    B = 1<<p
    if A==B:
      print(-1,-1,-1)
      exit()
    break
  p += 1
C = A^B
print(A,B,C)
0