結果

問題 No.976 2 の 128 乗と M
ユーザー kuhaku
提出日時 2020-02-24 01:35:24
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 2,000 ms
コード長 1,153 bytes
コンパイル時間 1,934 ms
コンパイル使用メモリ 194,084 KB
最終ジャッジ日時 2025-01-09 02:02:58
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Vec = vector<ll>;
template <typename T>
using Vec1 = vector<T>;
template <typename T>
using Vec2 = vector<Vec1<T> >;
#define all(s) (s).begin(), (s).end()
#define pb push_back
#define fs first
#define sc second
template <typename T>
bool chmax(T &a, const T b){if(a < b){a = b; return true;} return false;}
template <typename T>
bool chmin(T &a, const T b){if(a > b){a = b; return true;} return false;}
template <typename T>
ll pow2(const T n){return (1LL << n);}
void sonic(){ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);}
void setp(const ll n){cout << fixed << setprecision(n);}
const ll INF = 1e9+1;
const ll LINF = 1e18+1;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const ld PI = acos(-1);
const ld EPS = 1e-11;

__int128 PowMod(__int128 a, __int128 n, __int128 m){
	if(n == 1) return a;
	if(n%2 == 0) return PowMod(a*a%m, n/2, m);
	return a*PowMod(a*a%m, n/2, m)%m;
}

int main(void){
	ll m;
	cin >> m;
	ll ans = PowMod(2, 128, m);
	cout << ans << endl;

	return 0;
}
0