Submission #19308

# Submission time Handle Problem Language Result Execution time Memory
19308 2016-02-24T09:19:35 Z onjo0127 Α (kriii4_P1) C++
0 / 100
0 ms 1084 KB
#include<stdio.h>
#define N 1000000007
long long int a,b,ans=1;
long long int dt[60];
int main()
{
	int z;
	scanf("%lld %lld",&a,&b);
	dt[0]=1;
	dt[1]=a;
	for(z=2;z!=60;z++)
		dt[z]=(dt[z-1]*dt[z-1])%N;
	for(z=1;z!=60;z++){
		if(b%2)ans=(ans*dt[z])%N;
		b/=2;
	}
	printf("%lld",ans);
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1084 KB Output isn't correct
2 Halted 0 ms 0 KB -