当前位置:网站首页>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; }
边栏推荐
- Native table - scroll - merge function
- Microservice knowledge sorting - search technology and automatic deployment technology
- Global and Chinese market of high temperature Silver sintering paste 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
- 原生表格-滚动-合并功能
- An old programmer gave it to college students
- Global and Chinese markets of polyimide tubes for electronics 2022-2028: Research Report on technology, participants, trends, market size and share
- jvm jni 及 pvm pybind11 大批量数据传输及优化
- Teach you how to quickly recover data by deleting recycle bin files by mistake
- PR notes:
猜你喜欢

BOC protected alanine porphyrin compound TAPP ala BOC BOC BOC protected phenylalanine porphyrin compound TAPP Phe BOC Qi Yue supply

Kubernetes cluster builds efk log collection platform

How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code

5- (4-nitrophenyl) - 10,15,20-triphenylporphyrin ntpph2/ntppzn/ntppmn/ntppfe/ntppni/ntppcu/ntppcd/ntppco and other metal complexes

Wargames study notes -- Leviathan

Node MySQL serialize cannot rollback transactions

The 29th day of force deduction (DP topic)

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

2022 Xinjiang latest road transportation safety officer simulation examination questions and answers

Explore the internal mechanism of modern browsers (I) (original translation)
随机推荐
Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
In 2021, the global general crop protection revenue was about $52750 million, and it is expected to reach $64730 million in 2028
Global and Chinese market of high temperature Silver sintering paste 2022-2028: Research Report on technology, participants, trends, market size and share
Blue Bridge Cup: the fourth preliminary - "simulated intelligent irrigation system"
Microservice framework - frequently asked questions
Nerfplusplus parameter format sorting
The 29th day of force deduction (DP topic)
Plan for the first half of 2022 -- pass the PMP Exam
thrift go
Global and Chinese market of high purity copper foil 2022-2028: Research Report on technology, participants, trends, market size and share
Qtablewidget control of QT
Global and Chinese market of speed limiter 2022-2028: Research Report on technology, participants, trends, market size and share
强基计划 数学相关书籍 推荐
[raid] [simple DP] mine excavation
Microsoft: the 12th generation core processor needs to be upgraded to win11 to give full play to its maximum performance
Xctf attack and defense world crypto master advanced area olddriver
Micro service knowledge sorting - three pieces of micro Service Technology
Fingerprint password lock based on Hal Library
Realize user registration and login
The simplicity of laravel


