填数游戏
题解
讨论
查看他人的提交
题号:NC207819
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
64bit IO Format: %lld
题目描述
有长为n的连续格子,要在格子里面填上1-4这四个数字,要求同一个偶数出现的次数也是偶数次,问一共有多少种方案吗。
示例1
输入
复制
2
2
返回值
复制
6
6
说明
[1,1] [1,3] [2,2] [3,1] [3,3] [4,4]六种
备注:
,答案对1000000007取模
填数游戏
返回全部题目
列表加载中...
import java.util.*; public class Solution { /** * * @param n int整型 * @return int整型 */ public int GetNumberOfSchemes (int n) { // write code here } }
class Solution { public: /** * * @param n int整型 * @return int整型 */ int GetNumberOfSchemes(int n) { // write code here } };
# # # @param n int整型 # @return int整型 # class Solution: def GetNumberOfSchemes(self , n ): # write code here
/** * * @param n int整型 * @return int整型 */ function GetNumberOfSchemes( n ) { // write code here } module.exports = { GetNumberOfSchemes : GetNumberOfSchemes };
# # # @param n int整型 # @return int整型 # class Solution: def GetNumberOfSchemes(self , n ): # write code here
package main /** * * @param n int整型 * @return int整型 */ func GetNumberOfSchemes( n int ) int { // write code here }
/** * * @param n int整型 * @return int整型 */ int GetNumberOfSchemes(int n ) { // write code here }
2
6