結果
問題 | No.976 2 の 128 乗と M |
ユーザー | musuchika |
提出日時 | 2020-01-31 22:03:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 643 bytes |
コンパイル時間 | 1,454 ms |
コンパイル使用メモリ | 167,208 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-17 08:15:42 |
合計ジャッジ時間 | 2,801 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 50 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef long long ll; template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;} template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;} //自作関数 template<class T> ll llpow(T x,T n){ll ans=1;while(n--){ans*=x;}return ans;} #define rep(i,n) for(ll i=0;i<(ll)n;i++) #define rep2(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++) long long INF = 1LL<<60; int n; int main(){ ll m; cin>>m; ll ans=1; for(int i=1;i<=128;i++){ ans=ans*2%m; } cout<<ans<<endl; return 0; }