問題一覧 > 通常問題

No.976 2 to the Power of 128 and M

レベル : / AI推定難易度 : 475 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 450
作問者 : yuppe19 😺 / テスター : りあん
お気に入りにしたユーザー ProblemId : 3902 / 自分の提出
問題文最終更新日: 2020-01-30 21:34:06
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 235 (順位表) の他の問題:

Problem Statement

You are given a positive integer $M$.
Find the remainder when $2^{128}$ is divided by $M$.

Input

$M$

・$M$ is an integer satisfying $1 \le M \lt 2^{60}$.

Output

Output the remainder modulo $M$, followed by a newline.

Sample

Sample 1
Input
1
Output
0

The remainder when $2^{128}$ is divided by $1$ is $0$.

Sample 2
Input
5
Output
1

The remainder when $2^{128}$ is divided by $5$ is $1$.

Sample 3
Input
288230376151711743
Output
4096
Sample 4
Input
1152919305583591425
Output
3377698646784256

---

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