프로그래머스 87389 나머지가 1이 되는 수 찾기

1 개요[ | ]

프로그래머스 87389 나머지가 1이 되는 수 찾기

2 C++[ | ]

#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>

int solution(int n) {
    int answer = 2;
    while(n%answer != 1) answer++;
    return answer;
}
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}