fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5.  
  6. int a[34];
  7. int i;
  8. a[0]=2;
  9. a[1]=-1;
  10. int sam;
  11. sam=2;
  12. for(i=2;i<33;i++){
  13. a[i]=-a[i-1]+a[i-2]+2;
  14. if( i%4==0){
  15. sam=sam+a[i];
  16. }
  17. }
  18.  
  19. printf("%d",sam);
  20.  
  21. // your code goes here
  22. return 0;
  23. }
  24.  
  25.  
  26.  
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
7651242