21 lines
294 B
Python
21 lines
294 B
Python
|
#!/usr/bin/env python3
|
||
|
|
||
|
import sys
|
||
|
|
||
|
def F(n):
|
||
|
a = 0
|
||
|
b = 1
|
||
|
while n > 0:
|
||
|
c = a
|
||
|
a = a + b
|
||
|
b = c
|
||
|
n = n - 1
|
||
|
return a
|
||
|
|
||
|
def main():
|
||
|
for arg in sys.argv[1:]:
|
||
|
print("F(" + arg + "): " + str(F(int(arg))))
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
main()
|