摘要:
#include<iostream>#include<iomanip>using namespace std;#define MAXN 10010int main(){ double c[MAXN]; double a,b; int cases,n; cin>>cases; while(cases--) { cin>>n>>a>>b; double sum=0,tmp=0; for(int i=0;i<n;i++) { cin>>c[i]; } tmp=... 阅读全文
posted @ 2012-04-28 12:13
open your eyes
阅读(154)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int m,n; while(cin>>m>>n) { cout<<m*n-1<<endl; } return 0;} 阅读全文
posted @ 2012-04-28 12:12
open your eyes
阅读(107)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<cmath>using namespace std;int main(){ long long n; while(cin>>n) { if(n==0)break; n=(n-1960)/10+2; double flag1=pow(2.0,n+0.0)*log10(2.0); double flag2=0.0; for(int i=1;;i++) { flag2+=log10(i+0.0); i... 阅读全文
posted @ 2012-04-28 12:11
open your eyes
阅读(143)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<cmath>using namespace std;int main(){ int n; while(cin>>n) { unsigned long long a[10]={0}; int i,j; for(i=1;i<=n;i++) { a[0]+=i*i; } a[1]=(n*(n+1)/2)*(n*(n+1)/2); a[1]=a[1]-a[0]; for(i=1;i<=n;i++)... 阅读全文
posted @ 2012-04-28 12:11
open your eyes
阅读(139)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int sum; cin>>sum; while(sum--) { int m,n; int flag1,flag2; cin>>m>>n; flag1=m/3; flag2=n/3; cout<<flag1*flag2<<endl; } return 0;} 阅读全文
posted @ 2012-04-28 12:10
open your eyes
阅读(78)
评论(0)
推荐(0)
摘要:
#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
阅读(122)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<cstdio>using namespace std;int main(){ int k; int a[10010]; int b[10010]={0}; while(cin>>k) { int flag=0,j,r,temp; char c; while(scanf("%d%c",&temp,&c)==2) { a[flag++]=temp; if(c=='\n')break; } ... 阅读全文
posted @ 2012-04-28 12:10
open your eyes
阅读(135)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int H,U,D,F; while(cin>>H>>U>>D>>F) { if(H==0)break; int i; double temp=double(U)*(F/100.0); double sum=U; for(i=1;;i++) { if(sum>H) { cout<<"success on day "<<i... 阅读全文
posted @ 2012-04-28 12:09
open your eyes
阅读(156)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int sum; cin>>sum; while(sum--) { int m,n,i; cin>>m>>n; int dis=n-m; if(dis==0) cout<<"0"<<endl; else { for(i=0;;i++) { if(dis==i*i) ... 阅读全文
posted @ 2012-04-28 12:09
open your eyes
阅读(142)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<cstdio>using namespace std;int main(){ int n; double s; while(cin>>n) { if(n<0)break; if(n<=1)s=0; else s=n; s=s*25.0; printf("%.lf%%\n",s); } return 0;} 阅读全文
posted @ 2012-04-28 12:09
open your eyes
阅读(119)
评论(0)
推荐(0)

浙公网安备 33010602011771号