decimal a = 1;//定义初始值,decimal可以定义比较长的数值 decimal sum = 1; Console.WriteLine("第1个格子里有1粒米");//输出第一句话 for (int i = 2; i <= 20; i++)//假设棋盘有20个格子,因为上边已经输出第一句话,所以循环初始条件为2 { a = a * 2;//下一个格子…
We have two types of tiles: a 2x1 domino shape, and an "L" tromino shape. These shapes may be rotated. XX <- domino XX <- "L" tromino X Given N, how many ways are there to tile a 2 x N board? Return your answer modulo 10^9 + 7. (…