Submission

Status:

[TSSSSSSSSSSSSSSSSSSS]

Subtask/Task Score:

{0/100}

Score: 0

User: rice_ot

Problemset: ยกกำลัง

Language: cpp

Time: 0.299 second

Submitted On: 2025-10-14 16:23:27

#include <bits/stdc++.h>
using namespace std;

int main(){
    ios_base::sync_with_stdio(false); cin.tie(NULL);
    int n, t, e; cin>>n;

    for(int i = 0; i<n; i++){
        cin>>t>>e;
        int a = t;
        for(int j = 0; j<e; j++){
            t*=a;
            t%=1000000007;
        }
        cout<<t<<"\n";
    }
    
}