시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 1475 426 313 30.596%

문제

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

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

입력

첫째 줄에 테스트 케이스의 수가 주어진다. 다음 줄부터 한 줄에 하나씩 정수 m이 주어진다. (1 ≤ m ≤ 107)

출력

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

예제 입력 1

2
10
20

예제 출력 1

7
19
W3sicHJvYmxlbV9pZCI6Ijc4OTQiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQwNzAgXHVjMjE4IiwiZGVzY3JpcHRpb24iOiI8cD5cdWI5Y2VcdWM3NDAgXHVjNWI0XHVkNTBjXHViOWFjXHVjZjAwXHVjNzc0XHVjMTU4XHVjNzQwIFx1YjllNFx1YzZiMCBcdWQwNzAgXHVjMjE4XHViOTdjIFx1YzBhY1x1YzZhOVx1ZDU1Y1x1YjJlNC4gXHVjNzc0XHViN2VjXHVkNTVjIFx1YzViNFx1ZDUwY1x1YjlhY1x1Y2YwMFx1Yzc3NFx1YzE1OFx1Yzc0MCBcdWIzNzBcdWM3NzRcdWQxMzBcdWI5N2MgXHVjNTQ4XHVjODA0XHVkNTU4XHVhYzhjIFx1YzgwNFx1YzFhMVx1ZDU1OFx1YWNlMCwgXHVjNTU0XHVkNjM4XHVkNjU0XHVkNTU4XHVhZTMwIFx1YzcwNFx1ZDU3NFx1YzExYyBcdWMyMThcdWI5N2MgXHVkMGE0XHViODVjIFx1YzBhY1x1YzZhOVx1ZDU1Y1x1YjJlNC48XC9wPlxyXG5cclxuPHA+XHVjMjE4XHVhYzAwIFx1YzhmY1x1YzViNFx1YzljMFx1YmE3NCwgXHVhZGY4IFx1YzIxOFx1Yzc1OCBcdWQzMjlcdWQxYTBcdWI5YWNcdWM1YmNcdW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ucyBhcmUgdXNpbmcga2V5cyBmb3Igc2VjdXJlIHRyYW5zbWlzc2lvbiBvZiBkYXRhLCBlbmNyeXB0aW9uLCBldGMuIEluIHRoaXMgcHJvYmxlbSB5b3UgYXJlIGdpdmVuIGEgbnVtYmVyLCB5b3UgaGF2ZSB0byBkZXRlcm1pbmUgdGhlIG51bWJlciBvZiBkaWdpdHMgaW4gdGhlIGZhY3RvcmlhbCBvZiB0aGUgbnVtYmVyLjxcL3A+XHJcblxyXG48cD4mbmJzcDs8XC9wPlxyXG4iLCJpbnB1dCI6IjxwPklucHV0IGNvbnNpc3RzIG9mIHNldmVyYWwgbGluZXMgb2YgaW50ZWdlciBudW1iZXJzLiBUaGUgZmlyc3QgbGluZSBjb250YWlucyBhbiBpbnRlZ2VyIG4sIHdoaWNoIGlzIHRoZSBudW1iZXIgb2YgY2FzZXMgdG8gYmUgdGVzdGVkLCBmb2xsb3dlZCBieSBuIGxpbmVzLCBvbmUgaW50ZWdlciAxICZsdDs9IG0gJmx0Oz0gMTBeNyBvbiBlYWNoIGxpbmUuPFwvcD5cclxuXHJcbjxwPiZuYnNwOzxcL3A+XHJcbiIsIm91dHB1dCI6IjxwPlRoZSBvdXRwdXQgY29udGFpbnMgdGhlIG51bWJlciBvZiBkaWdpdHMgaW4gdGhlIGZhY3RvcmlhbCBvZiB0aGUgaW50ZWdlcnMgYXBwZWFyaW5nIGluIHRoZSBpbnB1dC48XC9wPlxyXG5cclxuPHA+Jm5ic3A7PFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

ICPC > Regionals > Asia West Continent > Bangladesh > Dhaka Regional Contest 2002 B번

  • 문제를 번역한 사람: baekjoon
  • 문제의 오타를 찾은 사람: djm03178