Submission
Status:
TTTTTTTTTT
Subtask/Task Score:
0/100
Score: 0
User: Dark_kingdom
Problemset: Medulla
Language: cpp
Time: 2.601 second
Submitted On: 2026-10-15 20:37:19
#include <iostream>
#include <cmath>
using namespace std;
long long f(long long x)
{
if (x<=2) return pow(x,3);
return pow(f(x-3),3) + f(x-2)*f(x-1);
}
int main()
{
cin.tie(nullptr)->sync_with_stdio(false);
long long n;
cin>>n;
for(long long i =0; i<n; i++)
{
int x;
cin>>x;
cout<<f(x)%20011<<"\n";
}
return 0;
}