結果

問題 No.976 2 の 128 乗と M
ユーザー set0gut1
提出日時 2020-01-31 21:23:31
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 578 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 82,980 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-17 07:02:45
合計ジャッジ時間 2,405 ms
ジャッジサーバーID
(参考情報)
judge2 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 50
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define MOD (1000000007l)
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)

using namespace std;

void solve() {
  ll M;
  cin >> M;
  ll ans = 1;
  rep (i, 128) {
    ans *= 2;
    ans %= M;
  }
  cout << ans << endl;
}

int main(void) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout.precision(12);
  cout << fixed;
  solve();
  return 0;
}
0