description 문제 history 제출 현황 question_mark 질문 how_to_vote 투표 #6266 upload 153회 done 45회 how_to_reg 40명 팩토리얼의 합의 마지막 수 timer 1초 memory 32MB chevron_left 이전 chevron_right 다음 문제 picture_in_picture_alt text_fields 1! + 2! + 3! + \dots + n! 의 마지막 자리의 숫자(1의 자릿수)는 얼마인가?여기서 n! = 1 \times 2 \times 3 \times \dots \times n이다. 즉, n!은 1부터 n까지 모든 자연수의 곱이다.예를 들어, 5! = 1 \times 2 \times 3 \times 4 \times 5 = 120 이다. 입력 첫 줄에 정수 n이 주어진다. (1 \le n \le 1,000,000,000) 출력 첫 줄에 정답에 해당하는 정수를 출력한다. 예제1 login 입력 1 content_copy logout 출력 1 content_copy 예제2 login 입력 2 content_copy logout 출력 3 content_copy 출처 KOI 시도예선 수학 2013 중고등부 1번 역링크 KOI #27 chevron_right 필기
chevron_left 이전 chevron_right 다음 문제 picture_in_picture_alt text_fields 1! + 2! + 3! + \dots + n! 의 마지막 자리의 숫자(1의 자릿수)는 얼마인가?여기서 n! = 1 \times 2 \times 3 \times \dots \times n이다. 즉, n!은 1부터 n까지 모든 자연수의 곱이다.예를 들어, 5! = 1 \times 2 \times 3 \times 4 \times 5 = 120 이다. 입력 첫 줄에 정수 n이 주어진다. (1 \le n \le 1,000,000,000) 출력 첫 줄에 정답에 해당하는 정수를 출력한다. 예제1 login 입력 1 content_copy logout 출력 1 content_copy 예제2 login 입력 2 content_copy logout 출력 3 content_copy 출처 KOI 시도예선 수학 2013 중고등부 1번 역링크 KOI #27 chevron_right 필기