Tag：Even numbers

Time：20211013
I’ll stop talking nonsense. Let’s look at the code directly~ ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 #Write a program to turn the even number in the list into his square def word_len(s): # s = [i ** 2 for i in s if i % 2 […]

Time：2021103
Project scenario: Project scenario: a node X and Y in the echarts diagram are fixed,To center the same column, which stipulates:The current column has an odd number of elements, and the new nodes are put down. When there are even numbers of nodes, the new nodes are put up。 Problem Description: If you delete an […]

Time：2021921
Three classical game problems Bash game: there is only a pile of N stones. A and B take turns to take 1 ~ m stones each time. Finally, the winner will win Wizov game: there are two piles of stones, a and B take turns. You can take any one (at least one) from a […]

Time：2021916
Start the leetcode series of dynamic programming. Self supplement related to theoretical knowledge points, old rules, or start with simple topics. Leetcode70 This is an entrylevel topic. Find the total number of methods for N steps. When you reach the last step n, there are only two situations, one is from n1 (one step) and […]

Time：2021831
import random Ou = “even”Ji = “odd”a = range(1,11) x = 0 while x < 10: list = random.sample(a,10) print(list) if list[0] % 2 != 0: print(ji, end=”,”) else: print(ou, end=”,”) if list[1] % 2 != 0: print(ji, end=”,”) else: print(ou, end=”,”) if list[2] % 2 != 0: print(ji, end=”,”) else: print(ou, end=”,”) if list[3] […]

Time：2021817
package main import ( “fmt” ) func main() { var s1 []int = []int{1,2,3,4,5,6} var s2 []int = []int{1,2} rotate(s1) rotate(s2) fmt.Println(s1) fmt.Println(s2) } func rotate(s []int){ left,rigth := 0,0 If len (s)% 2 = = 0{// judge whether the length is odd or even, and determine the center of rotation according to this left […]

Time：2021816
Finding prime pairs Goldbach guesses that everyone knows something. We don’t want to prove this conclusion now, but want to take out an even number arbitrarily from the number set that can be expressed in the program language to find two prime numbers so that the sum is equal to the even numberIf this fact […]

Time：202172
Topic 1: Calculation by Formula 1 π It is required to accumulate until the last term is less than 10 ^ ( 6). Program code: #include #include #include int main(){ float s=1; float pi=0; float i=1.0; float n=1.0; while(fabs(i)>=1e6){ pi+=i; n=n+2; //The design here is very clever. The sign is different every time s=s; i=s/n; […]

Time：2021411
Sub database and sub table Why do we have to divide the database and table? The amount of data in the database is uncontrollable. With the development of time and business, there are more and more data in the table. If you curd the database table again, it will cause performance problems. In order to […]

Time：2021322
Modification record: 2021.2.6 The format of the problem is unified 2021.2.3 At the end of the article, we add the recursive review link of big brother Ah, what is recursion? Namely: fromKnownreachunknown。Using observation to find the previous known data, we can get the conclusionRecurrence formulaAnd then the recursive formula is used to solve the problem. […]

Time：2021220
Title:An integer, after adding 100, is a complete square number, and then 168 is a complete square number. What is the number? Program analysis: Suppose the number is X. 1. Then: x + 100 = N2, x + 100 + 168 = m2 2. Calculation equation: M2 – N2 = (M + n) (M – […]

Time：202113
When writing a toast component, the text on the component will become blurred. It is found that the toast uses thetransform: translate(50%, 50%); ↑It’s the same ↑What it looks like after using translate In the process of reproduction, it is found that there is no blurring problem in Firefox, but there will be blurring problems […]