結果

問題 No.1298 OR XOR
ユーザー yuusanlondonyuusanlondon
提出日時 2020-11-27 21:25:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 72 ms / 2,000 ms
コード長 223 bytes
コンパイル時間 379 ms
コンパイル使用メモリ 86,888 KB
実行使用メモリ 71,340 KB
最終ジャッジ日時 2023-10-01 04:35:36
合計ジャッジ時間 2,458 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,088 KB
testcase_01 AC 71 ms
71,064 KB
testcase_02 AC 72 ms
70,876 KB
testcase_03 AC 72 ms
71,196 KB
testcase_04 AC 70 ms
71,104 KB
testcase_05 AC 70 ms
71,060 KB
testcase_06 AC 71 ms
71,116 KB
testcase_07 AC 71 ms
71,116 KB
testcase_08 AC 72 ms
71,232 KB
testcase_09 AC 71 ms
71,144 KB
testcase_10 AC 71 ms
71,340 KB
testcase_11 AC 72 ms
70,988 KB
testcase_12 AC 71 ms
71,104 KB
testcase_13 AC 71 ms
71,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[]
for i in range(40):
  if n&1<<i:
    a.append(i)
if len(a)==1:
  print(-1,-1,-1)
else:
  b=0
  c=0
  d=0
  b+=2**a[0]
  d+=2**a[0]
  for i in range(1,len(a)):
    b+=2**a[i]
    c+=2**a[i]
  print(b,c,d)
0