SZH0523 @ 2022-08-16 15:34:55
#include <bits/stdc++.h>
using namespace std;
signed main()
{
int T;
cin >> T;
if (T == 1)
{
cout << "I love Luogu!" << endl;
}
else if (T == 2)
{
cout << 2 + 4 << " " << 10 - 2 - 4 << endl;
}
else if (T == 3)
{
cout << 14/4 << " " << 14-14%4 << " " << 14%4 << endl;
}
else if (T == 4)
{
printf("%.3lf\n",500.0/3.0);
}
else if (T == 5)
{
cout << (260+220)/(12+20) << endl;
}
else if (T == 6)
{
cout << sqrt ( 6*6+9*9 ) << endl;
}
else if (T == 7)
{
cout << 10+100 << endl << 100+10-20 << endl << 0<< endl;
}
else if (T == 8)
{
double const pi=3.141593;
double const r=5;
cout << 5*2*3.1415923 << endl << 5*5*3.141593 << endl << 4.0/3*pi*r*r*r << endl;
}
else if (T == 9)
{
cout << (((1+1)*2+1)*2+1)*2 << endl;
}
else if (T == 10)
{
cout << (10-8)/2+8 << endl;
}
else if (T == 11)
{
cout << 100/(8-5) << endl;
}
else if (T == 12)
{
cout << 13 << endl << "R" << endl;
}
else if (T == 13)
{
double const pi=3.141593;
double V=pi*4*4*4*4/3+pi*10*10*10*4/3;
cout<<floor(pow(V,1.0/3))<<endl;
}
else if (T == 14)
{
cout << 50 << endl;
}
return 0;
}
by SZH0523 @ 2022-08-16 15:36:27
请大佬们看一看哪有问题。。。
by Life_alone @ 2022-08-16 15:55:51
by Life_alone @ 2022-08-16 15:56:22
@ SZH0523
by SZH0523 @ 2022-08-17 20:04:02
@Life_alone 谢谢啦。
by SZH0523 @ 2022-08-17 20:12:13
#include <bits/stdc++.h>
using namespace std;
signed main()
{
int T;
cin >> T;
if (T == 1)
{
cout << "I love Luogu!" << endl;
}
else if (T == 2)
{
cout << 2 + 4 << " " << 10 - 2 - 4 << endl;
}
else if (T == 3)
{
cout << 14/4 << endl << 14-14%4 << endl << 14%4 << endl;
}
else if (T == 4)
{
cout<<500.0/3<<endl;
}
else if (T == 5)
{
cout << (260+220)/(12+20) << endl;
}
else if (T == 6)
{
cout << sqrt ( 6*6+9*9 ) << endl;
}
else if (T == 7)
{
cout << 10+100 << endl << 100+10-20 << endl << 0<< endl;
}
else if (T == 8)
{
double const pi=3.141593;
double const r=5;
cout << 5*2*3.1415923 << endl << 5*5*3.141593 << endl << 4.0/3*pi*r*r*r << endl;
}
else if (T == 9)
{
cout << (((1+1)*2+1)*2+1)*2 << endl;
}
else if (T == 10)
{
cout << (10-8)/2+8 << endl;
}
else if (T == 11)
{
cout << 100 / 3.0;
}
else if (T == 12)
{
cout << 13 << endl << "R" << endl;
}
else if (T == 13)
{
double const pi=3.141593;
double V=pi*4*4*4*4/3+pi*10*10*10*4/3;
cout<<floor(pow(V,1.0/3))<<endl;
}
else if (T == 14)
{
cout << 50 << endl;
}
return 0;
}