Submission

Status:

TTTTTTTTTT

Subtask/Task Score:

0/100

Score: 0

User: Dark_kingdom

Problemset: Medulla

Language: cpp

Time: 2.604 second

Submitted On: 2026-10-15 20:35:18

#include <iostream>
#include <cmath>
using namespace std;

long long f(int 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(int i =0; i<n; i++)
	{
		int x;
		cin>>x;
		cout<<f(x)%20011<<"\n";
	}
	
	return 0;
}