結果
| 問題 |
No.403 2^2^2
|
| コンテスト | |
| ユーザー |
hiyokko2
|
| 提出日時 | 2017-08-05 15:47:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 602 bytes |
| コンパイル時間 | 1,350 ms |
| コンパイル使用メモリ | 159,852 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-11 20:36:03 |
| 合計ジャッジ時間 | 2,554 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 8 WA * 19 |
ソースコード
#include <bits/stdc++.h>
#define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)
#define MOD 1000000007
#define int long long
using namespace std;
typedef long long ll;
typedef vector<vector<ll>> mat;
const int INF = 1e9;
ll mod_pow(ll x, ll n, ll mod)
{
ll res = 1;
while (n > 0) {
if (n & 1) res = res * x % mod;
x = x * x % mod;
n >>= 1;
}
return res;
}
signed main()
{
ll A, B, C;
char c;
cin >> A >> c >> B >> c >> C;
cout << mod_pow(mod_pow(A, B, MOD), C, MOD) << " " << mod_pow(A, mod_pow(B, C, MOD), MOD) << endl;
}
hiyokko2