P27499 [AtCoder] Various Paths
普及+
题目描述

Problem Description

Construct a grid that satisfies all of the following conditions. It is guaranteed that such a grid always exists under the constraints of this problem.

  • Each cell of the grid is painted either white or black.
  • Let the lengths of the grid's sides be $ N $ and $ M $, respectively, where $ N $ and $ M $ are between $ 1 $ and $ 100 $ inclusive.
  • There are exactly $ K $ ways to reach the bottom-right cell from the top-left cell by only moving right or down through white cells.

Input Format

The input is given from the standard input in the following format:

$ K $

Output Format

In the first line, output the vertical length $ N $ and the horizontal length $ M $ of the grid separated by a space.

For the next $ N $ lines, output the grid information in $ N $ rows and $ M $ columns. The character at the $ i $-th row and $ j $-th column should be either # or ., where # indicates a black cell and . indicates a white cell.

Sample Input and Output

Sample Input #1

4

Sample Output #1

3 4
...#
#...
.#..

Sample Input #2

18

Sample Output #2

4 4
...#
....
....
#...

Notes/Hints

Constraints

  • $0 \leq K \leq 10^{18}$
  • $ K $ is an integer.

Sample Explanation 1

In this example, there are $ 4 $ ways to reach the bottom-right cell from the top-left cell by moving only right or down.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
4
样例输出
3 4 ...# #... .#..