fork download
  1. #include <stdio.h>
  2. int a(int n){
  3. int i;
  4. int a[100];
  5.  
  6. a[0]=0;
  7. a[1]=1;
  8. for(i=2;i<=n;i++){
  9. a[i]=5*a[i-1]+a[i-2];
  10. }return a[n];
  11. }
  12.  
  13. int main(void) {
  14. // your code goes here
  15. printf ("%d",a(4));
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
135