当前位置:文档之家› 西工大NOJ答案完全版

西工大NOJ答案完全版

else if((100<n<=1000)&&(n/100==n%10)) printf("yes\n");
else if((10<n<=100)&&(n/10==n%10)) printf("yes\n");
else if(0<n<=10) printf("yes\n");
else printf("no\n");
scanf("%lf%lf",&r,&h);
l=2*PI*r;
s=PI*r*r;
sq=4*PI*r*r;
vq=PI*r*r*r*4/3;
vz=PI*r*r*h;
printf("%.2lf\n%.2lf\n%.2lf\n%.2lf\n%.2lf\n",l,s,s
#include<stdio.h>
return 0;
}
#include<stdio.h>
int main()
{
double l,bon;
scanf("%lf",&l);
if(l<=10) bon=l*0.1;
else if(l<20) bon=1+(l-10)*0.075;
else if(l<40) bon=1.75+(l-20)*0.05;
else if((x-2)*(x-2)+(y+2)*(y+2)<=1) printf("10");
else if((x+2)*(x+2)+(y-2)*(y-2)<=1) printf("10");
else if((x+2)*(x+2)+(y+2)*(y+2)<=1) printf("10");
else printf("0");
return 0;
}
#include<stdio.h>
int main()
{
double l,x,r;
scanf("%lf %lf",&l,&r);
while((2*l*l*l-4*l*l+3*l-6)!=0&&(2*r*r*r-4*r*r+3*r-6)!=0){
x=(l+r)/2;
if((2*l*l*l-4*l*l+3*l-6)*(2*x*x*x-4*x*x+3*x-6)<=0)
{
double d,m;
scanf("%lf",&d);
if(d<=2) m=7;
else if(d<=15){
if(d-2==(int)(d-2)) m=7+(d-2)*1.5;
else m=7+((int)(d-2)+1)*1.5;
}
else if(d-15==(int)(d-15)) m=26.5+(d-15)*2.1;
#include<stdio.h>
int main()
{
int a,b,sum;
scanf("%d%d",&a,&b);
sum=a+b;
printf("%d\n",sum);
return 0;
}
#include<stdio.h>
#define PI 3.1415926
int main()
{
double r,h,l,s,sq,vq,vz;
}
printf("%d\n",sum);
return 0;
}
#include<stdio.h>
int main()
{
int i;
scanf("%d",&i);
if(i>=90) printf("A\n");
else if(i>=80) printf("B\n");
else if(i>=70) printf("C\n");
int main()
{
double ma,eng,c,sum,ave;
scanf("%lf%lf%lf",&ma,&eng,&c);
sum=ma+eng+c;
ave=sum/3;
printf("%lf\n%lf\n",sum,ave);
return 0;
}
#include<stdio.h>
int main()
else if(i>=60) printf("D\n");
else printf("E\n");
return 0;
}
#include<stdio.h>
int main()
{
double x,y;
scanf("%lf,%lf",&x,&y);
if((x-2)*(x-2)+(y-2)*(y-2)<=1) printf("10");
else Days=28;
switch(m){
case 1:sum=d;break;
case 2:sum=31+d;break;
case 3:sum=31+Days+d;break;
case 4:sum=62+Days+d;break;
case 5:sum=92+Days+d;break;
case 6:sum=123+Days+d;break;
else m=26.5+((int)(d-15)+1)*2.1;
printf("%lf\n",m);
return 0;
}
#include<stdio.h>
int main()
{
int y,m,d,Days,sum;
scanf("%d-%d-%d",&y,&m,&d);
if((y%4==0&&y%100!=0)||(y%400==0)) Days=29;
else if(l<60) bon=2.75+(l-40)*0.03;
else if(l<100) bon=3.35+(l-60)*0.015;
else bon=3.95+(l-100)*0.01;
printf("%lf\n",bon);
return 0;
}
#include<stdio.h>
int main()
{
int a,b,c,m;
scanf("%d%d%d",&a,&b,&c);
if (a>b) m=a;
else m=b;
if (m<c) m=c;
printf("%d",m);
return 0;
}
#include<stdio.h>
int main()
{
int n;
scanf("%d",&n);
if ((1000<n<10000)&&(n/1000==n%10)&&(n/100%10==n/10%10)) printf("yes\n");
case 7:sum=153+Days+d;break;
case 8:sum=184+Days+d;break;
case 9:sum=215+Days+d;break;
case 10:sum=245+Days+d;break;
case 11:sum=276+Days+d;break;
case 12:sum=307+Days+d;break;
相关主题