Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
发一个ws代码In Reply To:25行代码流出 Posted by:Sayakiss at 2010-08-09 18:51:37 #define P 3.1415926535898 #define F(x) x*x main(){int i,j,n,m;double s,t;while (scanf("%d%d",&n,&m),n){if (n*m%2){puts("0");continue;}t=pow(2,n*m/2);s=1;n++;m++;for (i=1;i<n;i++)for (j=1;j<m;j++)s*=F(cos(i*P/n))+F(cos(j*P/m));s=pow(s,.25);printf("%.0lf\n",s*t);}} Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator