Huawei OD Machine Test - Chorus (C++ & Java & JS & Python)

Table of contents

describe

Enter a description:

Output description:

Example 1

Java:

python:

C++:


describe

N students stand in a row, and the music teacher asks the least number of students to come out, so that the remaining K students form a chorus formation.

Suppose the K students are numbered 1, 2..., K from left to right, and their heights are

Guess you like

Origin blog.csdn.net/m0_68036862/article/details/132693406