結果
問題 |
No.976 2 の 128 乗と M
|
ユーザー |
![]() |
提出日時 | 2020-03-09 18:24:52 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 904 bytes |
コンパイル時間 | 1,719 ms |
コンパイル使用メモリ | 169,108 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-08 16:34:40 |
合計ジャッジ時間 | 3,243 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 50 |
ソースコード
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P>IP; typedef vector<ll> V; typedef vector<V> V2; typedef vector<vector<P> > G; void g_dir(G &graph, ll a, ll b, ll w = 1){graph[a].push_back(P(b, w));} void g_undir(G &graph, ll a, ll b, ll w = 1){g_dir(graph, a, b, w);g_dir(graph, b, a, w);} #define rep(i, n) for(ll (i) = 0; (i) < (n); (i)++) #define rep1(i, n) for(ll (i) = 1; (i) <= (n); (i)++) #define rrep(i, n) for(ll (i) = (n) - 1; (i) >= 0; (i)--) #define rrep1(i, n) for(ll (i) = (n); (i) >= 1; (i)--) template<class T> void chmax(T &a, const T &b){if(a < b){a = b;}} template<class T> void chmin(T &a, const T &b){if(a > b){a = b;}} const ll INF = 1145141919; const ll NUM = 101010; int main(){ ll M; cin >> M; ll ans = 1; rep(i, 128){ ans = (ans * 2) % M; } cout << ans << endl; return 0; }