Submission
Status:
[TSSSSSSSSSSSSSSSSSSS]
Score: 0
User: devilpoohs
Problemset: ยกกำลัง
Language: cpp
Time: 0.299 second
Submitted On: 2024-10-22 07:26:54
#include<bits/stdc++.h>
using namespace std ;
long double npow(unsigned long int a,int b){
unsigned long int koon=a ;
while(--b){
a = (a*koon)%1000000007;
}
return a;
}
using namespace std ;
int main(){
int n ;
cin >> n;
int a,b ;
while(n--){
cin >>a>>b ;
cout <<fixed <<setprecision(0)<< npow(a,b) ;
}
return 0;
}