Nie mam pojęcia czemu ten kod po wysłaniu nie jest zatwierdzony. Oto kod:
include
include
using namespace std;
int a;
int b;
int c;
int proby;
int main()
{
cin >> proby;
for (int i=0; i<proby; i++)
{
cin >> a >> b;
c=pow(a, b);
cout << c%10 << endl;
}
}