結果
問題 | No.2881 Mod 2^N |
ユーザー |
![]() |
提出日時 | 2024-09-08 12:45:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 243 bytes |
コンパイル時間 | 324 ms |
コンパイル使用メモリ | 82,340 KB |
実行使用メモリ | 53,900 KB |
最終ジャッジ日時 | 2024-09-08 12:45:33 |
合計ジャッジ時間 | 3,280 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 30 |
ソースコード
n, x, y = map(int, input().split())if x == y:print(0)exit()if y % 2 == 0:print(-1)exit()ans = []pre = nfor i in range(n)[::-1]:if y >> i & 1:ans.append(pre - i)pre = iprint(len(ans))print(*ans)