信息学奥赛一本通1006-1020

1006

#include<iostream>
using namespace std;
int main()
{
	long A,B,num;
	cin>>A>>B;
	num=A+B;
	cout<<num<<endl;
	return 0;
}

1007

#include<iostream>
using namespace std;
int main()
{
	long a,b,c,n;
	cin>>a>>b>>c;
	n=(a+b)*c;
	cout<<n<<endl;
	return 0;
}

1008

#include<iostream>
using namespace std;
int main()
{
	long a,b,c,n;
	cin>>a>>b>>c;
	n=(a+b)/c;
	cout<<n<<endl;
	return 0;
}

1009

#include"cstdio"
#include"iostream"
using namespace std;
int main ()
{
	int a,b,c,d;
	scanf("%d%d",&a,&b);
	c=a/b;
	d=a%b;
	printf("%d %d",c,d);
	return 0;
}

1010

#include"iostream"
#include"cstdio"
using namespace std;
int main()
{
	int a,b;
	double c;
	cin>>a>>b;
	c=1.0*a/b;
	printf("%.9lf",c);
	return 0;
}

1011

#include"cstdio"
using namespace std;
int main()
{
	double a,b;
	scanf("%lf %lf",&a,&b);
	double s;
	s=b*100/a;
	printf("%.3lf%%",s);
	return 0;
}

1012

#include"cstdio"
#include"iostream"
#include"cmath"
using namespace std;
int main ()
{
	double x,a,b,c,d,s;
	cin>>x>>a>>b>>c>>d;
	s=a*pow(x,3)+b*pow(x,2)+c*x+d;
	printf("%.7lf",s);
	return 0;
}

1013

#include"cstdio"
#include"iostream"
#include"cmath"
using namespace std;
int main ()
{
	double f;
    scanf("%lf", &f);
    printf("%.5lf",5*(f - 32)/9);
    return 0;
}

1014

#include"cstdio"
#include"iostream"
using namespace std;
const double PI=3.14159;
int main ()
{
	double r,d,c,s;
    scanf("%lf",&r);
    d=r*2;
    c=2*PI*r;
    s=PI*r*r;
    printf("%0.4lf %0.4lf %0.4lf",d,c,s);
    return 0; 
}

1015

#include"cstdio"
#include"iostream"
using namespace std;
int main ()
{
	double r1,r2,R;
	cin>>r1>>r2;
	R=1/(1/r1+1/r2);
	printf("%.2f",R);
	return 0;
}

1016

#include"cstdio"
#include"iostream"
using namespace std;
int main()
{
	int a;
	short b;
	cin>>a>>b;
	printf("%d %d",sizeof(a),sizeof(b));
	return 0;
}

1017

#include"cstdio"
#include"iostream"
using namespace std;
int main()
{
	float a;
	double b;
	cin>>a>>b;
	printf("%d %d",sizeof(a),sizeof(b));
	return 0;
}

1018

#include"cstdio"
#include"iostream"
using namespace std;
int main()
{
	bool a;
	char b;
	cin>>a>>b;
	printf("%d %d",sizeof(a),sizeof(b));
	return 0;
}

1019

#include"cstdio"
#include"iostream"
#include"cmath"
using namespace std;
int main()
{
	double n;
	cin>>n;
	cout<<int(n)<<endl;//强制转化 
	return 0;
}

1020

#include"iostream"
#include"cstdio"
using namespace std;
int main()
{
	char a;
	scanf("%c",&a);
	int b=a;
	printf("%d",b);
	return 0;
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

༺Blog༒Hacker༻

您的鼓励将是我更新最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值