結果

問題 No.2881 Mod 2^N
ユーザー timi
提出日時 2024-11-12 22:17:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 264 bytes
コンパイル時間 405 ms
コンパイル使用メモリ 82,316 KB
実行使用メモリ 54,040 KB
最終ジャッジ日時 2024-11-12 22:17:48
合計ジャッジ時間 3,962 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 26 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
N,X,Y=map(int,input().split())
if Y%2==0:
  print(-1)
  exit()
ans=[]
ans.append(N)
S=bin(Y)[2:]
c=0;f=0
for s in S:
  c+=1
  if s=='1':
    if f==0:
      f=1
    else:
      ans.append(c)
    c=0 
print(len(ans))
print(*ans)
0