fork download
  1. class Fact
  2. def fact(n)
  3. f=1
  4. while(a>1)
  5. f=f*a
  6. a=a-1
  7. end
  8. return f
  9. end
  10. end
  11. t=gets.to_i
  12. while(t>0)
  13. a=gets.to_i
  14. puts Fact.fact(a)
  15. t=t-1
  16. puts f
  17. end
Runtime error #stdin #stdout 0s 4760KB
stdin
1
80
stdout
Standard output is empty