当前位置:网站首页>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.
边栏推荐
- tensorflow报错Could not load dynamic library ‘libcudnn.so.8
- Axure does not display catalogs
- 如何正确使用Vertx操作Redis(3.9.4带源码分析)
- 【sql优化】with as 和 临时表的区别
- 一文读懂C语言中的结构体
- JS ternary expression complex condition judgment
- Wireshark packet analysis TCP, FTP
- HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.
- ffmpeg 错误码
- Wechat applet navigator has a shadow after clicking. Remove the shadow effect of navigator
猜你喜欢
Object creation
Uni app wechat applet one click login to obtain permission function
大厂音视频职位面试题目--今日头条
How to configure webrtc video streaming format for easygbs, a new version of national standard gb28181 video platform?
通过js实现金字塔(星号金字塔,回文对称数字金字塔)
新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?
Summary of SQL query de duplication statistics methods
SQL 入门计划-1-选择
HLS4ML报错The board_part definition was not found for tul.com.tw:pynq-z2:part0:1.0.
Interview questions for audio and video positions in Dachang -- today's headline
随机推荐
After studying 11 kinds of real-time chat software, I found that they all have these functions
Solution and summary of Nacos startup failure
P2433 【深基1-2】小学数学 N 合一
新增订单如何防止重复提交
OpenCV视频质量诊断----视频遮挡诊断
事务隔离级别 gap锁 死锁
JS ternary expression complex condition judgment
Mysql查询结果去除换行
Introduction to relevant processes and functions of wechat official account development
【AI服务器搭建】CUDA环境
Werewolf killing strategy: do you think I'm easy to cheat? Who do we believe!
新版国标GB28181视频平台EasyGBS如何配置WebRTC视频流格式播放?
118. Yanghui triangle
ffmpeg AVFrame 转 cv::Mat
1592 例题1 国王(Sgu223 LOJ10170 LUOGU1896 提高+/省选-) 暴力思考 状压DP 01背包
wireshark报文分析tcp,ftp
类加载机制
Wireshark packet analysis TCP, FTP
DTD modeling
【无标题】