UVA 10790

#include<iostream>
using namespace std;
int main()
{
    long long m,n,flag=1;
    while(cin>>m>>n)
    {
        if(m==0&&n==0)break;
        long long sum=0;
        sum=m*(m-1)*n*(n-1)/4;
        cout<<"Case "<<flag++<<": "<<sum<<endl;
    }
}

 

posted @ 2012-04-28 12:10  open your eyes  阅读(120)  评论(0编辑  收藏  举报