Pro.ID10208 TitleBetsy's Tour Title链接http://10.20.2.8/oj/exercise/problem?problem_id=10208 AC24 Submit36 Ratio66.67% 时间&空间限制描述A square township has been divided up into N2 square plots (1 ≤ N ≤ 7). The Farm is located in the upper left plot and the Market is located in the lower left plot. Betsy takes her tour of the township going from Farm to Market by walking through every plot exactly once. Shown below is one possible tour for Betsy when N=3. ---------------- Write a program that will count how many unique tours Betsy can take in going from Farm to Market for any value of N. 输入Line 1: A single integer N (1 ≤ N ≤ 7) 输出Description A square township has been divided up into N2 square plots (1 ≤ N ≤ 7). The Farm is located in the upper left plot and the Market is located in the lower left plot. Betsy takes her tour of the township going from Farm to Market by walking through every plot exactly once. Shown below is one possible tour for Betsy when N=3. ---------------- Write a program that will count how many unique tours Betsy can take in going from Farm to Market for any value of N. Input Line 1: A single integer N (1 ≤ N ≤ 7) Output A single line with a single integer, the number of unique tours. Sample Input 3 Sample Output 2 Source 样例输入3 样例输出2 作者 |