結果
問題 |
No.976 2 の 128 乗と M
|
ユーザー |
![]() |
提出日時 | 2020-02-01 00:03:46 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 832 bytes |
コンパイル時間 | 839 ms |
コンパイル使用メモリ | 92,384 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 11:48:57 |
合計ジャッジ時間 | 2,247 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 50 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <deque> #include <queue> #include <algorithm> #include <set> #include <map> #include <bitset> #include <cmath> #include <functional> #include <iomanip> #define vll vector<ll> #define vvv vector<vvl> #define vvi vector<vector<int> > #define vvl vector<vector<ll> > #define vv(a, b, c, d) vector<vector<d> >(a, vector<d>(b, c)) #define vvvl(a, b, c, d) vector<vvl>(a, vvl(b, vll (c, d))); #define rep(c, a, b) for(ll c=a;c<b;c++) #define re(c, b) for(ll c=0;c<b;c++) #define all(obj) (obj).begin(), (obj).end() typedef long long int ll; typedef long double ld; using namespace std; int main(int argc, char const *argv[]) { ll m;std::cin >> m; ll ans = 1; re(i, 128){ ans = (ans-m) + ans; if(ans<0) ans+=m; } std::cout << ans%m << '\n'; return 0; }