結果
問題 |
No.403 2^2^2
|
ユーザー |
![]() |
提出日時 | 2016-07-28 00:12:47 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,096 bytes |
コンパイル時間 | 629 ms |
コンパイル使用メモリ | 80,508 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-06 18:02:54 |
合計ジャッジ時間 | 1,653 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 2 WA * 25 |
ソースコード
#define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996) #include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <string> #include <queue> #include <functional> #include <sstream> #include <cmath> #include <set> #include <map> using namespace std; #define rep(i,a,b) for(int i=(a);i<(b);i++) #define pb push_back #define mp(a,b) make_pair(a,b) #define all(a) a.begin(),a.end() #define len(x) ((int)(x).size()) #define tmax(a,b,c) max((a),max((b),(c))) #define debug(x) cerr << #x << " is " << x << endl; typedef pair<int, int> Pii; typedef vector<int> V; typedef vector<vector<int> > VV; typedef long long ll; const int inf = 2e9; const int mod = 1e9 + 7; const long double eps = 1e-10; ll modpow(ll a, ll b, ll p) { if (!b) return 1; ll ret = modpow(a*a%p, b/2, p); if (b%2) ret = ret*a%p; return ret; } int main() { ll a, b, c; cin >> a >> b >> c; ll d = modpow(a,b,mod); ll e = modpow(d,c,mod); //debug(d); cout << e << " "; ll f = modpow(b,c,mod-1); ll g = modpow(a,f,mod); //cout << endl; debug(f); cout << g << endl; return 0; }