fork(2) download
  1. # your code goes here
  2. def f(a, b)
  3. if a == 0
  4. b + 1
  5. elsif b == 0
  6. f(a - 1, 1)
  7. else
  8. f(a - 1, f(a, b - 1))
  9. end
  10. end
  11.  
  12. print f(3, 3)
Success #stdin #stdout 0.06s 9768KB
stdin
Standard input is empty
stdout
61