当前位置:网站首页>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; }
边栏推荐
- JMeter connection database
- Get log4net log file in C - get log4net log file in C
- Instructions for common methods of regular expressions
- IP address is such an important knowledge that it's useless to listen to a younger student?
- Pat grade B 1009 is ironic (20 points)
- Promethus
- Cesiumjs 2022 ^ source code interpretation [7] - Analysis of the request and loading process of 3dfiles
- 11-grom-v2-05-initialization
- 4. Data splitting of Flink real-time project
- Based on laravel 5.5\5.6\5 X solution to the failure of installing laravel ide helper
猜你喜欢

BOC protected amino acid porphyrins TAPP ala BOC, TAPP Phe BOC, TAPP Trp BOC, Zn · TAPP ala BOC, Zn · TAPP Phe BOC, Zn · TAPP Trp BOC Qiyue

2.4 conversion of different data types

Change deepin to Alibaba image source

AcWing 1460. Where am i?

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

Wechat applet quick start (including NPM package use and mobx status management)

Qtablewidget control of QT

BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu

Test changes in Devops mode -- learning and thinking

Point cloud data denoising
随机推荐
11-grom-v2-04-advanced query
Microsoft: the 12th generation core processor needs to be upgraded to win11 to give full play to its maximum performance
Typora charges, WTF? Still need support
原生表格-滚动-合并功能
2.4 conversion of different data types
FAQs for datawhale learning!
Deep search DFS + wide search BFS + traversal of trees and graphs + topological sequence (template article acwing)
QT tutorial: signal and slot mechanism
JMeter plug-in installation
Global and Chinese market of high purity copper foil 2022-2028: Research Report on technology, participants, trends, market size and share
Commands related to files and directories
Exercises of function recursion
How to do Taobao full screen rotation code? Taobao rotation tmall full screen rotation code
AI enhanced safety monitoring project [with detailed code]
Nerfplusplus parameter format sorting
Point cloud data denoising
Derivation of decision tree theory
Native table - scroll - merge function
Battle drag method 1: moderately optimistic, build self-confidence (1)
Global and Chinese markets of cast iron diaphragm valves 2022-2028: Research Report on technology, participants, trends, market size and share


