inblog logo
|
stupefyee
    알고리즘문제풀기

    [JAVA 문제 풀이] 255. 피보나치 수

    프로그래머스 (12945)
    Stupefyee's avatar
    Stupefyee
    May 14, 2025
    [JAVA 문제 풀이] 255. 피보나치 수
    Contents
    내가 작성한 코드
    school.programmers.co.kr
    https://school.programmers.co.kr/learn/courses/30/lessons/12945
    notion image
     

    내가 작성한 코드

    class Solution { public int solution1(int n) { int a = 0; // F(0) int b = 1; // F(1) for (int i = 2; i <= n; i++) { int temp = (a + b) % 1234567; a = b; b = temp; } return b; // F(n) } }
    Share article
    Contents
    내가 작성한 코드

    stupefyee

    RSS·Powered by Inblog