Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
aaaaaaaaaaaa
#include <iostream> using namespace std; int x,k; int abr(int x) { if(x==1) {return 7;} else if(x==0) {return 0;} if(x%2==0)//parzyste {k=5;} else if(x%2>0)//nieparzyste {k=3;} return abr(x-1)+k*(abr(x-1)-abr(x-2)); } int testy,pok; int main() { cin>>testy; for(int i=0;i<testy;i++) { cin>>pok; cout<<abr(pok)<<endl; } }
run
|
edit
|
history
|
help
0
Breakfast Function
series
Good pairs
constexpr expirements
NameTempSpecial2
ExceptInviteClass
find first non repeating
Test 1(2021)
spiral traversal of a matrix
data locality - slow example