View Code of Problem 3696

#include<iostream>
using namespace std;
#include<cmath>
int main()
{
	int n;
	while(cin>>n)
	{
		cout<<(int)pow(n,n)%10<<endl;
	}
}

Double click to view unformatted code.


Back to problem 3696