当前位置:网站首页>Preliminary practice of niuke.com (11)
Preliminary practice of niuke.com (11)
2022-07-03 20:19:00 【Deer nine pills】
Catalog
1. Little Lele asks for peace
#include<stdio.h> int main() { int n = 0; long long sum = 0; int i = 0; scanf("%d", &n); for (i = 1; i <= n; i++) { sum += i; } printf("%lld", sum);// Clear from the topic int Type cannot store this result , So want to use long long int Type return 0; }
2. Little Lele and Euclid
#include<stdio.h> int main() { long long n = 0; long long m = 0; scanf("%lld %lld",&n,&m); long long n2 = n; long long m2 = m; long long max = 0; long long min = 0; long long temp = 0; while (temp = n % m ) { n = m; m = temp; } max = m; min = n2 * m2 / max; printf("%lld", max + min); return 0; } // This question , It is also necessary to use long long int Type to store
3. Little Lele and sequence
#include<stdio.h> int main() { int n = 0; int arr[100001] = {0}; scanf("%d",&n); int tmp = 0; for(int i = 0;i<n;i++) { scanf("%d",&tmp); arr[tmp] = tmp; } for(int i = 0;i<n;i++) { if(arr[i]!=0) { printf("%d ",arr[i]); } } return 0; }
边栏推荐
- How to read the source code [debug and observe the source code]
- 2.6 formula calculation
- Popularize the basics of IP routing
- Rad+xray vulnerability scanning tool
- Test access criteria
- About callback function and hook function
- Use of CMD command
- thrift go
- Golang type assertion and conversion (and strconv package)
- Wechat applet quick start (including NPM package use and mobx status management)
猜你喜欢
Teach you how to quickly recover data by deleting recycle bin files by mistake
Meso tetra [P - (p-n-carbazole benzylidene imino)] phenylporphyrin (tcipp) /eu (tcipp) [pc( α- 2-oc8h17) 4] and euh (tcipp) [pc (a-2-oc8h17) 4] supplied by Qiyue
44. Concurrent programming theory
Don't be afraid of no foundation. Zero foundation doesn't need any technology to reinstall the computer system
Gym welcomes the first complete environmental document, which makes it easier to get started with intensive learning!
Detailed and not wordy. Share the win10 tutorial of computer reinstallation system
Q&A:Transformer, Bert, ELMO, GPT, VIT
2.2 integer
FAQs for datawhale learning!
Nerfplusplus parameter format sorting
随机推荐
2022 Xinjiang latest road transportation safety officer simulation examination questions and answers
Parental delegation mechanism
原生表格-滚动-合并功能
JMeter plug-in installation
Camera calibration (I): robot hand eye calibration
Initialization and instantiation
[raid] [simple DP] mine excavation
2.2 integer
First knowledge of database
2.4 conversion of different data types
Global and Chinese market of speed limiter 2022-2028: Research Report on technology, participants, trends, market size and share
Sword finger offer 30 Stack containing min function
Professional interpretation | how to become an SQL developer
Global and Chinese market of two in one notebook computers 2022-2028: Research Report on technology, participants, trends, market size and share
Promethus
44. Concurrent programming theory
Print linked list from end to end
Microservice knowledge sorting - search technology and automatic deployment technology
Test access criteria
Titles can only be retrieved in PHP via curl - header only retrieval in PHP via curl