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

33553번 - Floor Tiling 다국어

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

문제

Your friend John has recently moved to the city of Delft. During the decoration of one of the rooms in his house, he decided that he does not like the current floor in the room. He has seen several interesting floor patterns but there's one pattern that has his favor: a floor that is covered domino planks. A domino plank is a special type of plank that has a width of one meter and a height of two meters. The planks can be laid out horizontally or vertically and cannot be sawed into smaller pieces. Now John still has to decided how the floor is going to look like because there are many possibilities to cover the whole floor. For example, if the room of John is 3x8 meters, there are already 153 possible ways of covering the floor!

John would like to know how many possibilities there are for each room in his house. Since he's very smart, he has come up with a program that outputs, given the height and width of the room, the number of ways to cover the floor of the room with domino tiles. He challenges you to do the same, but he made the problem easier: you can assume that the width of the rooms is always 3 meter. Moreover, you can assume that the width of the room is even (otherwise the floor cannot be fully covered with domino planks). Can you solve the challenge of John and tell how many possible coverings there are for a 3 x $ 2n $ floor?

입력

A single integer n, 1ドル \leq n \leq 100$.

출력

The number of different ways in which a $ 3 $ x $ 2n $ floor can be tiled with domino planks.

제한

예제 입력 1

1

예제 출력 1

3

예제 입력 2

15

예제 출력 2

299303201

힌트

출처

University > Delft University of Technology > Sjaars Kampioenschap Programmeren 2015 F번

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

출처

대학교 대회

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

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