冷饮的价格
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
float e;
e = (2.5*a)+(1.5*b)-2.5;
cout<<fixed<<setprecision(1)<<e<<endl;
return 0;
}
小明买水果
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float a;
cin>>a;
int e;
cin>>e;
int t;
t = a*e;
cout<<fixed<<setprecision(2)<<a<<endl;
cout<<e<<endl;
cout<<t<<endl;
return 0;
}
1957
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;
cin>>a;
cin>>b;
cin>>c;
float d;
d = (a+b+c)%3;
cout<<fixed<<setprecision(3)<<d<<endl;
return 0;
}
1602
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x,y,z;
cin>>x;
cin>>y;
cin>>z;
int a;
a = x+y+z;
double d =a%3;
cout<<a<<endl;
cout<<fixed<<setprecision(1)<<d<<endl;
return 0;
}
1598
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x,y,n;
cin>>x;
cin>>y;
cin>>n;
double o = n-(x+y)+0.1-0.1;
cout<<x<<y<<n<<endl;
cout<<fixed<<setprecision(1)<<o<<endl;
return 0;
}
1601
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int x,a,z;
cin>>x;
a = x*3;
z = a-8;
float e;
e =0.1+(x+a+z)/3-0.1;
cout<<a;
cout<<z;
cout<<fixed<<setprecision(2)<<e<<endl;
return 0;
}
1005
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int a;
cin>>a;
double e =3.14*a*a;
double i =3.14*2*a;
cout<<fixed<<setprecision(2)<<e<<endl;
cout<<fixed<<setprecision(2)<<i<<endl;
return 0;
}
1337
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
float e;
cin>>e;
float i =3.14*e*e;
cout<<fixed<<setprecision(2)<<i<<endl;
return 0;
}
1338
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int r1,r2;
cin>>r1>>r2;
float a =3.14*r1*r2;
cout<<fixed<<setprecision(2)<<a<<endl;
return 0;
}
1317
#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
int r1;
cin>>r1;
float a =(r1-2)*180;
cout<<fixed<<setprecision(1)<<a<<endl;
return 0;
}
1565