Class assignment problem

link to problem

#include<bits/stdc++.h>
using namespace std;


int calculate_numbers(int n){
if(n==1)
	return 2;
else if(n==2)
	return 3;
else
return calculate_numbers(n-1)+calculate_numbers(n-2);
}

int main(){

int t;
cin>>t;
while(t--){
int n;
cin>>n;
cout<<"#"<<n<<" : "<<calculate_numbers(n)<<endl;

}

}

`
I think this code should be correct
but I am getting wrong-answer error.
plz give some hints!

1 Like

In the output
#1
represents output index and not n

Yes Vikalp is right. Your output format is wrong. You have to output cout<<# Test case No << <<endl;

1 Like

hey can u plz explain how u reached to such a crisp solution… i can not understand how your code works

2 Likes