結果

問題 No.976 2 の 128 乗と M
ユーザー orieka
提出日時 2020-06-16 03:23:30
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 489 bytes
コンパイル時間 912 ms
コンパイル使用メモリ 95,940 KB
最終ジャッジ日時 2025-01-11 04:36:26
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include <bitset>
#include <utility>
#include <numeric>
#include <queue>
#include <stack>

using ll = long long;
using namespace std;

constexpr int MOD = 1e9 + 7;
constexpr ll MOD_LL = ll(1e9) + 7;

int main(void) {
	ll m;
	cin >> m;
	
	ll x = 1LL;
	
	for(int i = 0; i < 128; ++i) {
		x *= 2LL;
		x %= m;
	}
	
	cout << x << endl;
	
	return 0;
}
0