Submission #20423786


Source Code Expand

#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using mint = modint;
using Graph = vector<vector<int>>;
#define ALL(x) (x).begin(), (x).end()
#define REP(i ,n) for(int i = 0; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
typedef vector<int>vint;
typedef vector<ll>vll;
template<typename T> istream &operator>>(istream &is, vector<T> &vec){ for (auto &v : vec) is >> v; return is; }
template<typename A,typename B>inline bool chmin(A &a,const B &b){if(a>b){a=b;return true;}else{return false;}}
template<typename A,typename B>inline bool chmax(A &a,const B &b){if(a<b){a=b;return true;}else{return false;}}

int main(){
    ll A,B,C;
    cin >> A >> B >> C;
    mint::set_mod(4);
    mint y = ((mint)B).pow(C);
    mint::set_mod(10);
    mint ans = ((mint)A).pow(y.val()+4);
    cout << ans.val() << endl;
}

Submission Info

Submission Time
Task B - A^B^C
User kiuyuki
Language C++ (GCC 9.2.1)
Score 400
Code Size 912 Byte
Status AC
Exec Time 6 ms
Memory 3628 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 3
AC × 28
Set Name Test Cases
Sample s1.txt, s2.txt, s3.txt
All 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, 25.txt, s1.txt, s2.txt, s3.txt
Case Name Status Exec Time Memory
01.txt AC 6 ms 3504 KiB
02.txt AC 2 ms 3504 KiB
03.txt AC 2 ms 3600 KiB
04.txt AC 2 ms 3528 KiB
05.txt AC 2 ms 3604 KiB
06.txt AC 2 ms 3604 KiB
07.txt AC 2 ms 3440 KiB
08.txt AC 2 ms 3600 KiB
09.txt AC 2 ms 3604 KiB
10.txt AC 2 ms 3608 KiB
11.txt AC 2 ms 3600 KiB
12.txt AC 2 ms 3572 KiB
13.txt AC 3 ms 3504 KiB
14.txt AC 3 ms 3440 KiB
15.txt AC 2 ms 3504 KiB
16.txt AC 2 ms 3604 KiB
17.txt AC 2 ms 3624 KiB
18.txt AC 2 ms 3440 KiB
19.txt AC 3 ms 3604 KiB
20.txt AC 2 ms 3420 KiB
21.txt AC 3 ms 3608 KiB
22.txt AC 2 ms 3416 KiB
23.txt AC 4 ms 3628 KiB
24.txt AC 2 ms 3560 KiB
25.txt AC 2 ms 3440 KiB
s1.txt AC 2 ms 3420 KiB
s2.txt AC 2 ms 3576 KiB
s3.txt AC 2 ms 3524 KiB