• ## Online maximum common factor calculator

Time：2021-10-17

Online maximum common factor calculator Online maximum common factor calculator The tool can calculate the maximum common factor of 2 given numbers, which is calculated by pure client. The greatest common factor, also known as the greatest common divisor and the greatest common factor, refers to the largest of the common divisors of two or […]

• ## Basic data structure and algorithm of hand golang Euclidean algorithm of maximum common divisor / rolling Division

Time：2021-10-11

Basic data structure and algorithm of hand golang Euclidean algorithm of maximum common divisor / rolling Division origin Recently read < < my first algorithm book > > ([Japan] Ishida Baohui; Miyazaki Xiuyi)This series of notes is intended to use golang exercises Euclidean algorithm Euclidean algorithm (also known as rolling Division) is used to calculate […]

• ## [title] card grouping – lotcode

Time：2021-3-2

Title: card grouping Given a deck of cards, an integer is written on each card. At this point, you need to select a number x, so that we can divide the whole deck into one or more groups according to the following rules: Each group has X cards.All cards in the group have the same […]

• ## Integer ring

Time：2021-1-17

ring Integer ringZ_mIt consists of the following two parts: 1. AssemblyZ_m = ( 0,1,2,…,m )2. Two kinds of operations “+” and “X” make thea, b\in Z_myes: a + b\equiv c\ mod\ m, (c\in Z_m)\\ a\times b\equiv d\ mod\ m, (d\in Z_m) Key features of rings If the result of the addition or multiplication of any […]

• ## Array of algorithms — the maximum number of points in a common line

Time：2020-11-20

The maximum number of points on a line difficultydifficulty Given a two-dimensional plane, there are n points on the plane, find the maximum number of points on the same line. Example 1:Input: [[1,1],[2,2],[3,3]]Output: 3Explanation: Example 2:Input: [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]]Output: 4Explanation: thinking First, you need to make sure that two points are on a straight line – that […]

• ## Interviewer: write a code to find the greatest common divisor of two numbers

Time：2020-11-2

Recently, I went to an interview and met several companies. I deeply realized that the more basic the problem is, the more important it is. The more I can investigate a person’s technical skills and logical thinking. Like what we’re going to say nextFind the greatest common divisor of two numbersThe problem. This kind of […]

• ## C practical exercise topic 16 – greatest common divisor and least common multiple

Time：2020-10-19

Title:Enter two positive integers m and N to find the greatest common divisor and the least common multiple. Program analysis: (1) The least common multiple = the product of two input numbers divided by their greatest common divisor, the key is to find the greatest common divisor; (2) To find the greatest common divisor by […]

• ## 100 cases of C programming (10): maximum common divisor

Time：2020-6-3

Example 10 maximum common divisor Problem description There are three positive integers a, B, C (0 input data Enter a n n in the first row to indicate that there are n groups of test data, and enter two positive integers a and B in the next n rows. Output format Output the corresponding C, […]

• ## Getting started with C – loop

Time：2020-3-11

I. circulation Input a number and output several digits #include int main() { int x; int n = 0; scanf(“%d” , &x); n++; x /= 10; while(x > 0){ n++; x /= 10; } printf(“%d\n”,n); return 0; } 2、 While loop The circulatory body should have the opportunity to change the conditions and avoid the […]