fork download
  1. #include <stdio.h>
  2. int func(int x, int y, int z)
  3. {
  4. static int count=0;
  5. int px=1,py=1;
  6. if(x==0&&y==0&&z==0)
  7. {
  8. return count;
  9. }
  10. count++;
  11. for(int i=0;i<z;i++)
  12. {
  13. px*=x;
  14. py*=y;
  15. }
  16. return px+py;
  17. }
  18. int main(void)
  19. {
  20. int i;
  21. for(i=1;i<5;i++) func(i,i,i);
  22. printf("%d\n", func(0,0,0));
  23. return 0;
  24. }
Success #stdin #stdout 0s 5332KB
stdin
Standard input is empty
stdout
4