Inaccurate Expectations
시간 제한1초메모리 제한2048 MB
각 단계에서 파일 n개와 하위 폴더 n개를 만들고 n을 하나 줄여 재귀하는 생성기가 만드는 전체 파일 수를 구한다.
문제
Jake is doing a lot of programming. Recently Jake has been working on an archiving tool, because organizing isn't one of his strengths. Jake learned that testing is an important part of programming. He needs to make some file generating tool, to make sure his archiving tool is not messing up. Jake has already created a simple generator to generate some folders and files, ready to use his archiving tool on. However the generator seems to take a very long time to finish, if it finishes at all.
It seems Jake has some inaccurate expectations of the effect of his generator. Can you help Jake figure out how many files his generating tool is actually creating, for the given input?
The generator works as follows: in the root folder, files and folders are created. In each of those folders, is used to generate the contents of that folder. Calling does nothing, of course.
입력
A single integer n,
출력
A single integer, the number of files (not the folders) created by .