沈陈成 实验小学 514
本帖最后由 沈陈成 于 2024-4-27 16:50 编辑沈陈成 实验小学 514 a=int(input('uhsdfuilurgy'))
if a<=10:
print('2.5')
else:
b=a-10
c=b*2.5
print(2.5+c)
1011: 【入门】行礼托运价格
import turtle
import random
turtle.speed(0)
def rectangle(width,hight):
turtle.pendown()
color = ['red', 'yellow', 'blue', 'white', 'white', 'white', 'white']
turtle.fillcolor(random.choice(color))
turtle.begin_fill()
for i in range(2):
turtle.forward(width)
turtle.left(90)
turtle.forward(hight)
turtle.left(90)
turtle.end_fill()
turtle.penup()
width_list=[]
hight_list=[]
for i in range(5):
width_list.append(random.randint(100,120))
hight_list.append(random.randint(60,90))
print(width_list)
print(hight_list)
import turtle
import random
turtle.speed(0)
def rectangle(width,hight):
turtle.pendown()
color = ['red', 'yellow', 'blue', 'white', 'white', 'white', 'white']
turtle.fillcolor(random.choice(color))
turtle.begin_fill()
for i in range(2):
turtle.forward(width)
turtle.left(90)
turtle.forward(hight)
turtle.left(90)
turtle.end_fill()
turtle.penup()
width_list=[]
hight_list=[]
for i in range(5):
width_list.append(random.randint(100,120))
hight_list.append(random.randint(60,90))
print(width_list)
print(hight_list)
#include<iostream>
using namespace std;
int main(){
double y,x;
cin>>x;
if (x>0 && x<5){
y=(x+(2.5-x-x));
}else if(x>=5 && x<10){
y=(2-1.5*(x-3)*(x-3));
}else if(x>=10 && x<20){
y=(x/2-1.5);
}
printf("%.3f",y);
return 0;
} #include<iostream>
#include<cmath>
using namespace std;
int main(){
double salary;
double tax,income;
cin>>salary;
if (salary<3500){
cout<<0<<" "<<salary<<endl;}
else{
salary=salary-3500;}
if (salary<=1500){
tax=salary*0.03-0;
income=salary-tax;}
else if(salary<=4500){
tax = salary *0.1-105;
income = salary - tax ;
cout<<tax<<" "<<income+3500;}
else if (salary >4500 && salary<=9000){
tax = salary *0.2-555;
income = salary - tax ;
cout<<tax<<" "<<income+3500;}
else if ( salary <=35000){
tax = salary *0.25-1005;
income = salary - tax ;
cout<<tax<<" "<<income+3500;}
else if ( salary <=55000){
tax = salary *0.3-2755;
income = salary - tax ;
cout<<tax<<" "<<income+3500;}
else if ( salary <=80000){
tax = salary *0.35-5505;
income = salary - tax ;
cout<<tax<<" "<<income+3500;}
else if ( salary >80000){
tax = salary *0.45-13505;
income = salary - tax ;
cout<<tax<<" "<<income+3500;}
return 0;
} #include <iostream>
#include <iomanip>
using namespace std;
int main() {
double a,total=0;
int n;
cin>>n;
for(int i=0;i<n;i++){
cin>>a;
total+=a;
}
cout<<fixed<<setprecision(4)<<total/n<<endl;
return 0;
} #include<iostream>
#include <iomanip>
using namespace std;
int main(){
double a,s,d,f;
double z;
cin>>a>>s>>d>>f;
z=(d*f-a*s)/(f-s);
cout <<fixed<<setprecision(2)<<z<<endl;
return 0;
} #include<iostream>
using namespace std;
int main(){
int a,s,d;
cin>>a>>s>>d;
cout<<(a+s)*d<<endl;
return 0;
} #include<iostream>
using namespace std;
int main(){
int a,s,d;
cin>>a>>s>>d;
cout<<(a+s)/d<<endl;
return 0;
}