当前位置:网站首页>P2433 [deep foundation 1-2] primary school mathematics n in one
P2433 [deep foundation 1-2] primary school mathematics n in one
2022-07-01 19:42:00 【A program ape who beats the keyboard violently】
P2433 【 Deep base 1-2】 Primary school mathematics N Unity
# 【 Deep base 1-2】 Primary school mathematics N Unity
## Title Description
### problem 1
Please export `I love Luogu!`
### problem 2
Here you are 10 An apple , Small A Take away 2 individual ,Uim Take away 4 individual , Bawei Yong takes all the remaining apples . We want to know :
1. Small A and Uim How many apples did two people take altogether ?
2. How many apples can Bawei Yong take ?
Now you need to write a program , Output two numbers as the answer , Use a space to separate .
### problem 3
Now there is 14 An apple . Give them all to 4 Famous students , Put the apples that can't be divided back in the fridge . Excuse me, :
1. How many apples can each student get ?
2. How many apples did you share out ?
3. Put some apples back in the fridge ?
Now you need to write a program , Output three numbers as the answer , One line for each number .
### problem 4
Now there is 500 Ml of fat house happy water , Give them all to 3 Famous students , How many milliliters can each student get ? Please output a number as output . Retain 6 Significant digits , And do not use scientific counting .
### problem 5
Train a is the conductor 260 rice , Rows per second 12 rice ; The second train conductor 220 rice , Rows per second 20 rice , The two cars are facing each other , Start timing when the two cars meet at the front , How long will the two cars leave at the back ? The known answer is an integer .
### problem 6
The length and width of a rectangle are 6cm、9cm, Find its diagonal length (cm). Use it directly cout Output .
### problem 7
Uim There are... In the bank account 100 element . After the following operations :
1. Put it in 10 element ;
2. Shopping costs 20 element ;
3. Take out all the money in it .
Please output the account balance after each operation , And use newline characters to separate .
### problem 8
When the radius is r=5, Please output the circumference of the circle 、 Area and ball volume . take π=3.141593. Please use cout Output the answer , One number per line .
### problem 9
A little monkey bought some peaches . On the first day, he just ate half of these peaches , Another greedy one ; The next day he had just eaten half of the remaining peaches , Greedy ate one more ; On the third day, he just ate half of the remaining peaches , And greedily ate one more . On the fourth day, I got up and looked , I found that there was only one peach left . How many peaches did the little monkey buy ?
### problem 10
The evaluation task of Luogu is increased evenly in unit time .8 Evaluation machine 30 Minutes can just finish the evaluation of the program in the evaluation queue ,10 Evaluation machine 6 Minutes can just finish the evaluation of the program in the evaluation queue , How many evaluation machines can be used in 10 The program in the evaluation queue is just evaluated in minutes ?
### problem 11
Small A Running speed 5m/s, Bawei Yong's running speed 8m/s, Eight tail Yong in the small A Back 100m, They started at the same time , How long will it take for Bawei Yong to catch up with Xiao A? Output a number to show the answer , Use cout Direct output .
### problem 12
We all know that there is 26 English letters , among A It's the first letter . Now please program to find :
1. M Is the first letter of the alphabet ?
2. The first 18 What is the first letter ?
Output a number and a letter , Use a newline to separate .
### problem 13
Small A There are two pieces of spherical plasticine , One radius is 4, One radius is 10. He wants to rub the two pieces of plasticine together , Then shape it into a cube , What is the edge length of this cube ? If the result is not an integer , Then round off the number after the decimal point . take $\pi = 3.141593$.
### problem 14
According to the prediction of Gugu online school , When the course price is 110 Yuan time , There will be 10 People sign up . If the course price decreases every 1 element , There will be more 1 Applicants ( vice versa ). If you want to receive a total of 3500 If the tuition is yuan , So how much should it be priced ? It is known that two answers to this question meet the requirements , Take the smaller one . If the answer is not an integer , Round to the nearest whole number .
## Input format
Enter a number , Indicates the number of questions .
## Output format
According to each question , Output an answer .
## Examples #1
### The sample input #1
```
2
```
### Sample output #1
```
6 4
```
## Tips
Please solve the following math problems in primary school . You can submit answers , You can also write a program .
For this question , If you don't know how to type , You can also copy :
```
#include<iostream>
// Fill in other header files you think you need
using namespace std;
int main() {
int T;
cin >> T;
if (T == 1) {
// Paste problem 1 The main function code of , except return 0
cout << "I love Luogu!";
} else if (T == 2) {
// Paste problem 2 The main function code of , except return 0
cout << 2 + 4 << " " << 10 - 2 - 4;
} else if (T == 3) {
// Please complete the question by yourself 3 Code for
} else if (T == 4) {
// Please complete the question by yourself 4 Code for
} else if (T == 5) {
// Please complete the question by yourself 5 Code for
} else if (T == 6) {
// Please complete the question by yourself 6 Code for
} else if (T == 7) {
// Please complete the question by yourself 7 Code for
} else if (T == 8) {
// Please complete the question by yourself 8 Code for
} else if (T == 9) {
// Please complete the question by yourself 9 Code for
} else if (T == 10) {
// Please complete the question by yourself 10 Code for
} else if (T == 11) {
// Please complete the question by yourself 11 Code for
} else if (T == 12) {
// Please complete the question by yourself 12 Code for
} else if (T == 13) {
// Please complete the question by yourself 13 Code for
} else if (T == 14) {
// Please complete the question by yourself 14 Code for
}
return 0;
}
```
【 Ideas 】
Separate all the questions do Come out and be punished .
【93 Code division 】
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<string>
#include<vector>
using namespace std;
const double pi=3.141593;
inline int fread()
{
char ch=getchar();
int n=0,m=1;
while(ch<'0' or ch>'9')
{
if(ch=='-')m=-1;
ch=getchar();
}
while(ch>='0' and ch<='9')n=(n<<3)+(n<<1)+ch-48,ch=getchar();
return n*m;
}
int n;
signed main()
{
n=fread();
if(n==1)cout<<"I love Luogu!";
else if(n==2)cout<<"6 4";
else if(n==3)cout<<"3\n12\n2";
else if(n==4)cout<<"166.667";
else if(n==5)cout<<"15";
else if(n==6)cout<<sqrt(117);
else if(n==7)cout<<"110\n90\n0";
else if(n==8)cout<<10*pi<<"\n"<<25*pi<<"\n"<<500/3*pi;
else if(n==9)cout<<22;
else if(n==10)cout<<9;
else if(n==11)cout<<100/3.0;
else if(n==12)cout<<"13\nR";
else if(n==13)cout<<(int)pow((256*pi/3.0)+(4000*pi/3.0),1/3.0);
else cout<<50;
return 0;
}I don't know what's wrong . Look at him, total 14 The first test data should be 8 The whole problem is wrong , Next data point and then A 了 .

【AC Code 】
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<string>
#include<vector>
using namespace std;
const double pi=3.141593;
inline int fread()
{
char ch=getchar();
int n=0,m=1;
while(ch<'0' or ch>'9')
{
if(ch=='-')m=-1;
ch=getchar();
}
while(ch>='0' and ch<='9')n=(n<<3)+(n<<1)+ch-48,ch=getchar();
return n*m;
}
int n;
signed main()
{
n=fread();
if(n==1)cout<<"I love Luogu!";
else if(n==2)cout<<"6 4";
else if(n==3)cout<<"3\n12\n2";
else if(n==4)cout<<"166.667";
else if(n==5)cout<<"15";
else if(n==6)cout<<sqrt(117);
else if(n==7)cout<<"110\n90\n0";
else if(n==8)cout<<10*pi<<"\n"<<25*pi<<"\n"<<523.599;
else if(n==9)cout<<22;
else if(n==10)cout<<9;
else if(n==11)cout<<100/3.0;
else if(n==12)cout<<"13\nR";
else if(n==13)cout<<(int)pow((256*pi/3.0)+(4000*pi/3.0),1/3.0);
else cout<<50;
return 0;
}Data is a good thing
Although I don't understand what data means.
边栏推荐
- Oracle物理体系结构
- JS的Proxy
- Analysis of GetMessage underlying mechanism
- 新增订单如何防止重复提交
- 【sql优化】with as 和 临时表的区别
- 新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?
- 解决VSCode下载慢或下载失败的问题
- How to solve the problem of splash screen when the main and sub code streams of easygbs are h.265?
- MySQl的基本使用
- A brief understanding of white box encryption technology
猜你喜欢

118. Yanghui triangle

GC garbage collection

uni-app微信小程序一键登录获取权限功能

GB28181之SIP协议

Wireshark packet analysis TCP, FTP

Les canaux de culture intensive s'efforcent de développer Fu Xin et Wei Shi jiajie pour organiser une conférence de formation sur les nouveaux produits

Uni app product classification

Class loading mechanism
![Thesis reading [distinctive late semantic graph for video capturing]](/img/d4/4f84a73a9127fa87bb0a74c4655d15.png)
Thesis reading [distinctive late semantic graph for video capturing]

How to solve the problem of splash screen when the main and sub code streams of easygbs are h.265?
随机推荐
Oracle物理体系结构
DDR4 test-2
A brief understanding of white box encryption technology
Live HLS protocol
JS 之 常用内置类的使用
Remove line breaks from MySQL query results
GB28181之SIP协议
利用win7漏洞进行系统登录密码破解
音频编解码基础知识
703. The k-th element in the data flow
OpenCV视频质量诊断----视频遮挡诊断
HLS4ML/vivado HLS 报错解决方案
Shell高级进阶
[go ~ 0 to 1] day 4 June 30 defer, structure, method
DTD modeling
servlet知识点
新增订单如何防止重复提交
解决VSCode下载慢或下载失败的问题
Facebook聊单,SaleSmartly有妙招!
科技T3国产平台!成功搭载“翼辉国产实时系统SylixOS”