No.976 2 to the Power of 128 and M
問題文最終更新日: 2020-01-30 21:34:06
English (AI translation)
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もしくは右上の雲マークをクリックしてアカウントを作成してください。
りあん