当前位置:网站首页>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; }
边栏推荐
- Golang type assertion and conversion (and strconv package)
- Ruby replaces gem Alibaba image
- Promethus
- February 14-20, 2022 (osgear source code debugging +ue4 video +ogremain source code transcription)
- Realize user registration and login
- 2.7 format output of values
- Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
- About callback function and hook function
- AcWing 1460. Where am i?
- How to set the system volume programmatically- How to programmatically set the system volume?
猜你喜欢

Example of peanut shell inner net penetration

Test panghu was teaching you how to use the technical code to flirt with girls online on Valentine's Day 520

BOC protected phenylalanine zinc porphyrin (Zn · TAPP Phe BOC) / iron porphyrin (Fe · TAPP Phe BOC) / nickel porphyrin (Ni · TAPP Phe BOC) / manganese porphyrin (Mn · TAPP Phe BOC) Qiyue Keke

Test changes in Devops mode -- learning and thinking

Explore the internal mechanism of modern browsers (I) (original translation)

Task of gradle learning

Use of aggregate functions

Upgrade PIP and install Libraries

2.7 format output of values

How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code
随机推荐
2022 Xinjiang latest construction eight members (standard members) simulated examination questions and answers
The 15 year old interviewer will teach you four unique skills that you must pass the interview
Test changes in Devops mode -- learning and thinking
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
Point cloud data denoising
Native table - scroll - merge function
Global and Chinese market of high purity copper foil 2022-2028: Research Report on technology, participants, trends, market size and share
Bright purple crystal meso tetra (4-aminophenyl) porphyrin tapp/tapppt/tappco/tappcd/tappzn/tapppd/tappcu/tappni/tappfe/tappmn metal complex - supplied by Qiyue
Rd file name conflict when extending a S4 method of some other package
2.1 use of variables
Global and Chinese market of micro positioning technology 2022-2028: Research Report on technology, participants, trends, market size and share
How to read the source code [debug and observe the source code]
Teach you how to quickly recover data by deleting recycle bin files by mistake
It is discussed that the success of Vit lies not in attention. Shiftvit uses the precision of swing transformer to outperform the speed of RESNET
Recommendation of books related to strong foundation program mathematics
Unittest framework is basically used
7. Data broker presentation
Cap and base theory
Global and Chinese markets of lithium chloride 2022-2028: Research Report on technology, participants, trends, market size and share
Introduction to golang garbage collection


