Logo
(追記) (追記ここまで)

33786번 - Inaccurate Expectations 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB191947348.667%

문제

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 $g(root, n)$ works as follows: in the root folder, $n$ files and $n$ folders are created. In each of those folders, $g(folder, n - 1)$ is used to generate the contents of that folder. Calling $g(folder, 0)$ does nothing, of course.

입력

A single integer n, 0ドル \leq n \leq 1000$

출력

A single integer, the number of files (not the folders) created by $g(root, n)$.

제한

예제 입력 1

0

예제 출력 1

0

예제 입력 2

2

예제 출력 2

4

힌트

출처

University > Delft University of Technology > Sjaars Kampioenschap Programmeren 2014 I번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /