시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 1341 372 267 28.465%

문제

많은 어플리케이션은 매우 큰 숫자를 사용한다. 이러한 어플리케이션은 데이터를 안전하게 전송하고, 암호화하기 위해서 숫자를 키로 사용한다.

숫자가 주어지면, 그 숫자의 팩토리얼의 자리수를 구하는 프로그램을 작성하시오.

입력

첫째 줄에 테스트 케이스로 이루어져 있다. 다음 줄부터 한 줄에 하나씩 m이 주어진다. (1 ≤ m ≤ 107)

출력

입력으로 주어지는 숫자 m마다 m!의 길이를 출력한다.

예제 입력 1

2
10
20

예제 출력 1

7
19
W3sicHJvYmxlbV9pZCI6Ijc4OTQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQwNzAgXHVjMjJiXHVjNzkwIiwiZGVzY3JpcHRpb24iOiI8cD5cdWI5Y2VcdWM3NDAgXHVjNWI0XHVkNTBjXHViOWFjXHVjZjAwXHVjNzc0XHVjMTU4XHVjNzQwIFx1YjllNFx1YzZiMCBcdWQwNzAgXHVjMjJiXHVjNzkwXHViOTdjIFx1YzBhY1x1YzZhOVx1ZDU1Y1x1YjJlNC4gXHVjNzc0XHViN2VjXHVkNTVjIFx1YzViNFx1ZDUwY1x1YjlhY1x1Y2YwMFx1Yzc3NFx1YzE1OFx1Yzc0MCBcdWIzNzBcdWM3NzRcdWQxMzBcdWI5N2MgXHVjNTQ4XHVjODA0XHVkNTU4XHVhYzhjIFx1YzgwNFx1YzFhMVx1ZDU1OFx1YWNlMCwgXHVjNTU0XHVkNjM4XHVkNjU0XHVkNTU4XHVhZTMwIFx1YzcwNFx1ZDU3NFx1YzExYyBcdWMyMmJcdWM3OTBcdWI5N2MgXHVkMGE0XHViODVjIFx1YzBhY1x1YzZhOVx1ZDU1Y1x1YjJlNC48XC9wPlxyXG5cclxuPHA+XHVjMjJiXHVjNzkwXHVhYzAwIFx1YzhmY1x1YzViNFx1YzljMFx1YmE3NCwgXHVhZGY4IFx1YzIyYlx1Yz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