当前位置:网站首页>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.
边栏推荐
- How to add transactions in JDBC
- GB28181之SIP协议
- 商业智能BI开发和报表开发有什么本质区别?
- JDBC中如何添加事务
- Thesis reading [distinctive late semantic graph for video capturing]
- EasyGBS网络不稳定情况下重复请求视频拉流问题的优化
- Interview question 16.16 Partial sorting - Double finger needling
- What is the essential difference between Bi development and report development?
- Optaplanner learning notes (I) case cloud balance
- Using win7 vulnerability to crack the system login password
猜你喜欢
wireshark报文分析tcp,ftp
如何正确使用Vertx操作Redis(3.9.4带源码分析)
What must be done in graduation season before going to Shanhai
1592 例题1 国王(Sgu223 LOJ10170 LUOGU1896 提高+/省选-) 暴力思考 状压DP 01背包
HLS4ML进入方法
Regular expression =regex=regular expression
GC garbage collection
What is the essential difference between Bi development and report development?
Uni app wechat applet one click login to obtain permission function
对象的创建
随机推荐
[English grammar] Unit1 articles, nouns, pronouns and numerals
MySQl的基本使用
【无标题】
ddr4测试-2
SQL 入门计划-1-选择
P2433 【深基1-2】小学数学 N 合一
较真儿学源码系列-InheritableThreadLocal(逐行源码带你分析作者思路)
js三元表达式复杂条件判断
GC garbage collection
Collect Tiktok video
Proxy in ES6
JDBC中如何添加事务
ffmpeg 音频相关命令
使用 Kibana Timelion 进行时间序列分析
[go ~ 0 to 1] day 4 June 30 defer, structure, method
Shell高级进阶
Basic knowledge of audio coding and decoding
测试自学人必看:软件测试如何找测试项目?
Methods of finding various limits
Opencv video quality detection -- sharpness detection