fork download
  1. #include <stdio.h>
  2.  
  3. int c = 0;
  4. int rec(int n) {
  5. c++;
  6.  
  7. if (n == 0) return 3;
  8. else if (n == 1) return 0;
  9. else if (n == 2) return 2;
  10. else return rec(n - 2) + rec(n - 3);
  11. }
  12.  
  13. int main(void) {
  14. int n = 9;
  15. for(int i=1; i<=n; i++){
  16. if(rec(i)%i==0){
  17. printf("%d",i);
  18. }
  19. }
  20.  
  21. return 0;
  22. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
12357