問題一覧 > 通常問題

No.2483 Yet Another Increasing XOR Problem

レベル : / AI推定難易度 : 2500 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 31
作問者 : ytqm3 / テスター : shiomusubi496
お気に入りにしたユーザー ProblemId : 10115 / 自分の提出
問題文最終更新日: 2023-09-23 14:56:10
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 405 技術室奥プログラミングコンテスト#7 Day1 (順位表) の他の問題:

Problem Statement

You are given a positive integer $M$. Find the number, modulo $998244353$, of sequences of non-negative integers $a=(a_1,a_2,\ldots,a_{\lvert a \rvert})$ of positive length that satisfy the following conditions.

  • $0 \le a_i < M$
  • Defining $b_i := a_1 \oplus a_2 \oplus \ldots \oplus a_i$, it holds that $b_1 < b_2 < \ldots < b_{\lvert a \rvert}$ (corrected at 21:37)

Input

$M$
  • $1 \le M \le 10^{18}$
  • All input values are integers.

Output

Output the answer.

Sample

Sample 1
Input
3
Output
9
Sample 2
Input
314
Output
383758347

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。