So i have that code
#include
using namespace std;
int wynik, a, ile;
int silnia(int m)
{
if(m==1) return 1;
else return m*silnia(m-1);
}
int main()
{
cin >> ile;
for(int i=0; i<ile; i++)
{
cin >> a;
wynik = silnia(a);
cout << (wynik%100 - wynik%10)/10 << " " << wynik%10;
}
return 0;
}
Since, before it said the time limit has been exceeded, so i have that new code. To make it faster i used recursion, but it still says that the time limit has been exceeded, wth am i supposed to do???