fork(3) download
  1. object Main {
  2. def fibc(n: Int): Int = {
  3. if (n < 3) 1
  4. else fibc(n - 1) + fibc(n - 2);
  5. }
  6.  
  7.  
  8. def main(args: Array[String]): Unit =
  9. {
  10. println(fibc(40))
  11. }
  12. }
Success #stdin #stdout 1.03s 321984KB
stdin
Standard input is empty
stdout
102334155