fork download
  1. #include <stdio.h>
  2.  
  3. int xynta(unsigned n) // n > 3
  4. {
  5. static int yoba[50000001];
  6.  
  7. yoba[1] = 1;
  8.  
  9. for (int i = 2; i <= n; ++i)
  10. yoba[i] = i - yoba[yoba[i - 1]];
  11.  
  12. return yoba[n];
  13. }
  14.  
  15. int main(void)
  16. {
  17. printf("%d\n", xynta(50000000));
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.41s 198592KB
stdin
Standard input is empty
stdout
30901700