시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
2 초 128 MB 10178 3543 2744 35.022%

문제

3×N 크기의 벽을 2×1, 1×2 크기의 타일로 채우는 경우의 수를 구해보자.

입력

첫째 줄에 N(1 ≤ N ≤ 30)이 주어진다.

출력

첫째 줄에 경우의 수를 출력한다.

예제 입력 1

2

예제 출력 1

3

힌트

아래 그림은 3×12 벽을 타일로 채운 예시이다.

W3sicHJvYmxlbV9pZCI6IjIxMzMiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWQwYzBcdWM3N2MgXHVjYzQ0XHVjNmIwXHVhZTMwIiwiZGVzY3JpcHRpb24iOiI8cD4zJnRpbWVzO04gXHVkMDZjXHVhZTMwXHVjNzU4IFx1YmNiZFx1Yzc0NCAyJnRpbWVzOzEsIDEmdGltZXM7MiBcdWQwNmNcdWFlMzBcdWM3NTggXHVkMGMwXHVjNzdjXHViODVjIFx1Y2M0NFx1YzZiMFx1YjI5NCBcdWFjYmRcdWM2YjBcdWM3NTggXHVjMjE4XHViOTdjJm5ic3A7XHVhZDZjXHVkNTc0XHViY2Y0XHVjNzkwLjxcL3A+XHJcbiIsImlucHV0IjoiPHA+XHVjY2FiXHVjOWY4IFx1YzkwNFx1YzVkMCBOKDEgJmxlOyBOICZsZTsgMzApXHVjNzc0IFx1YzhmY1x1YzViNFx1YzljNFx1YjJlNC48XC9wPlxyXG4iLCJvdXRwdXQiOiI8cD5cdWNjYWJcdWM5ZjggXHVjOTA0XHVjNWQwIFx1YWNiZFx1YzZiMFx1Yzc1OCBcdWMyMThcdWI5N2MgXHVjZDljXHViODI1XHVkNTVjXHViMmU0LjxcL3A+XHJcbiIsImhpbnQiOiI8cD5cdWM1NDRcdWI3OTggXHVhZGY4XHViOWJjXHVjNzQwIDMmdGltZXM7MTIgXHViY2JkXHVjNzQ0IFx1ZDBjMFx1Yzc3Y1x1Yjg1YyBcdWNjNDRcdWM2YjQgXHVjNjA4XHVjMmRjXHVjNzc0XHViMmU0LjxcL3A+XHJcblxyXG48cD48aW1nIGFsdD1cIlwiIHNyYz1cIlwvdXBsb2FkXC9pbWFnZXNcLzI2NjNfMS5qcGdcIiBzdHlsZT1cImhlaWdodDo4MHB4OyB3aWR0aDoyNzNweFwiIFwvPjxcL3A+XHJcbiIsIm9yaWdpbmFsIjoiMCIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVkNTVjXHVhZDZkXHVjNWI0In0seyJwcm9ibGVtX2lkIjoiMjEzMyIsInByb2JsZW1fbGFuZyI6IjEiLCJ0aXRsZSI6IlRyaSBUaWxpbmciLCJkZXNjcmlwdGlvbiI6IjxwPkluIGhvdyBtYW55IHdheXMgY2FuIHlvdSB0aWxlIGEgM3huIHJlY3RhbmdsZSB3aXRoIDJ4MSBkb21pbm9lcz88XC9wPlxyXG5cclxuPHA+SGVyZSBpcyBhIHNhbXBsZSB0aWxpbmcgb2YgYSAzeDEyIHJlY3RhbmdsZTxcL3A+XHJcbiIsImlucHV0IjoiPHA+SW5wdXQgY29uc2lzdHMgb2Ygc2V2ZXJhbCB0ZXN0IGNhc2VzIGZvbGxvd2VkIGJ5IGEgbGluZSBjb250YWluaW5nIC0xLiBFYWNoIHRlc3QgY2FzZSBpcyBhIGxpbmUgY29udGFpbmluZyBhbiBpbnRlZ2VyIDAgJmxlOyBuICZsZTsgMzAuJm5ic3A7PFwvcD5cclxuIiwib3V0cHV0IjoiPHA+Rm9yIGVhY2ggdGVzdCBjYXNlLCBvdXRwdXQgb25lIGludGVnZXIgbnVtYmVyIGdpdmluZyB0aGUgbnVtYmVyIG9mIHBvc3NpYmxlIHRpbGluZ3MuPFwvcD5cclxuIiwiaGludCI6IiIsIm9yaWdpbmFsIjoiMSIsInByb2JsZW1fbGFuZ19jb2RlIjoiXHVjNjAxXHVjNWI0In1d

출처

Contest > Waterloo's local Programming Contests > 24 September, 2005 D번

  • 문제의 오타를 찾은 사람: imgosari