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

    [JAVA 문제풀이] 피자 나눠 먹기(1)

    Stupefyee's avatar
    Stupefyee
    Nov 15, 2024
    [JAVA 문제풀이] 피자 나눠 먹기(1)
    notion image
    💡
    class Solution { public int solution(int n) { // 7의 배수가 아니면 +1 int result = 0; if(n%7 == 0) { result = n/7; } else { result = n/7 + 1; } int answer = result; return answer; } }
    Share article

    stupefyee

    RSS·Powered by Inblog