Tag：Move right

Time：2021615
To find 1 + 2 +… + N, it is required that keywords such as multiplication and division, for, while, if, else, switch, case, and conditional judgment statements (a? B: C) cannot be used. Example 1: Input: n = 3 Output: 6 Example 2: Input: n = 9 Output: 45 Restrictions:1 <= n <= 10000 […]

Time：202158
Operators are used to perform mathematical or logical operations while a program is running. operator The builtin operators of go language are: Arithmetic operator Relational operators Logical operators Bitwise Operators Assignment Operators Arithmetic operator operator describe + Add – subtract * Multiply / be divided by % Surplus be careful: ++(self increasing) and–(self subtraction) is […]

Time：2021319
Title Description The supermarket is selling chocolates at a special price, and lucky is being greedy_ Dog saw it.Chocolate from left to right in a row, a total of N, m kinds.There is a strange rule in the supermarket, that is, when you buy chocolate, you must provide two numbers a and B, representing that […]

Time：202127
concept Bit operators allow evaluation and manipulation of the bits specified in an integer number. command Example variable $a = 1; / / 8bit binary 0000 0001 $B = 3; / / 8bit binary 0000 0011 Command symbol name example effect result Binary & And (bitwise AND) $a & $b If the bits in $a […]

Time：2021128
brief introduction Insert sort is to insert the elements to be sorted into the sorted array to form a new ordered array. This algorithm is called insert sort. Insert sort example Similarly, if we have an array: 29, 10, 14, 37, 20, 25, 44, 15, how can we insert and sort it? Let’s first look […]

Time：2021118
This chapter mainly studies the coding methods of unsigned numbers, complements and floatingpoint numbers in the computer. By studying the actual coding methods of numbers, we can understand the range of values that can be represented by different types of data in the computer, the properties of different arithmetic operations, and know how the computer […]