L2 : 피보나치 수 Python

jhyunn·2023년 1월 25일
0

Programmers

목록 보기
65/69

L2 : 피보나치 수 Python

https://school.programmers.co.kr/learn/courses/30/lessons/12945

def solution(n):
    f = [0, 1]
    for i in range(2, n+1):
        f = [f[1], f[0]+f[1]]
        
    return f[1] % 1234567
profile
https://github.com/Sungjeonghyun

0개의 댓글