COCI00062
Pascal
레이팅
의견: 0
설명
Little Frane is already in tenth grade, but is still struggling with Pascal in computer class. For homework, his teacher wrote the following program into his notebook, and he needs to determine the output, given the integer \(N\).
readln(N);
counter := 0;
for i := N-1 downto 1 do begin
counter := counter + 1;
if N mod i = 0 then break;
end;
writeln(counter);
Write a program which solves Frane's problem.
제약
입력 형식
The first line of input contains the integer \(N\) (\(1 \le N \le 10^9\)).
출력 형식
Output the result on a single line.
서브태스크
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 30점 |
예제 1
입력
1출력
0예제 2
입력
10출력
5예제 3
입력
27출력
18문제 정보
태그
평가 및 의견
Pascal
개요
Log in to rate problems.
개별 의견
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Pascal
게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다.
로그인하고 제출하기