13 lines
137 B
Plaintext
Raw Normal View History

2024-07-18 16:08:30 +00:00
import sys
2024-07-09 08:28:14 +00:00
main() {
2024-07-18 16:08:30 +00:00
sys.exit(fibonacci(10))
2024-07-09 08:28:14 +00:00
}
fibonacci(x) {
2024-07-11 09:53:49 +00:00
if x <= 1 {
2024-07-09 08:28:14 +00:00
return x
}
return fibonacci(x - 1) + fibonacci(x - 2)
}