洛谷2433

#include<iostream>
#include <iomanip> 
#include <cmath>
// 填上你觉得需要的其他头文件
using namespace std;
int main() {
    int T;
    cin >> T;
    if (T == 1) {
        cout << "I love Luogu!";
    } else if (T == 2) {
        cout << 2 + 4 << " " << 10 - 2 - 4;
    } else if (T == 3) {
     	cout<<14/4<<endl;
	    cout<<14-2<<endl;
		cout<<2<<endl;
    } else if (T == 4) {
       	cout.setf(ios::fixed);
		cout<<setprecision(3);
		cout<<500.0/3;
    } else if (T == 5) {
       	cout<<(260+220)/32;
    } else if (T == 6) {
        cout<<sqrt(6*6+9*9);
    } else if (T == 7) {
       cout<<110<<endl;
       cout<<90<<endl;
       cout<<0<<endl;
    } else if (T == 8) {
       	const float pi =3.141593;
		float zhou,mian,ti;
		zhou = 2*pi*5;
		mian = pi*5*5;
		ti = (4.0/3)*pi*5*5*5;
		cout<<zhou<<endl;
		cout<<mian<<endl;
		cout<<ti<<endl;	
    } else if (T == 9) {
      	int x = 1;
		for(int i = 0;i<3;i++)
		{
			x = (x+1)*2;
		}
		cout<<x;
    } else if (T == 10) {
        cout<<9;
    } else if (T == 11) {
       cout << (float)100 / 3;
    } else if (T == 12) {
       	char a = 'A';
		char m = 'M';
		char n ;
		int n1;
		int a1 = a;
		int m1 = m;
		n1 = a1 + 18-1;
		n = n1;
		cout<<m1-a1+1<<endl;
		cout<<n;
    } else if (T == 13) {
       	const float pi =3.141593;
		float x;
		x = 4.0/3*pi*(4*4*4+10*10*10);
		cout<<(int)pow(x,1.0/3);
    } else if (T == 14) {
        int a[2];
		int j = 0;
		for (int i = 0; i < 100; i++)
		{
			if ((110 - i) * (10 + i) == 3500)
			{
				a[j++] = 110 - i;
			}
		}
		if (a[0] >= a[1])
			cout << a[1];
		else
			cout << a[0];
	}


    return 0;
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值