View Code of Problem 3696

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
int main() {
	long long int n,sum;
	
	while(scanf("%lld",&n)!=EOF)
	{
		sum=pow(n,n);
		int x=sum%10;
		printf("%d\n",x);
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 3696