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
TempBubbleDouble
LRU - template
День Программиста
segmentedSieveD
Изволов#8
Bit count in number
Programa 3 (corregido)
Palindrome
union of two sorted array
¡Arriba, Papalotes, Arriba! v2