using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(RectangleNum(5, 6));
}
static int RectangleNum(int m, int n)
{
int num = 0;
for (int i = 0; i < m; i++)
{
for (int j = 0; j < n; j++)
{
num += i == j ? 0 : (m - i ) * (n - j);
}
}
return num;
}
}
}
相关文章: