Search

5月 2022
-    -  5月

April 2021 Best J-pops!

Squary Given N integer, is it possible to add at least 1 and at most K elements such that the sum of the squares of all elements in list equals square of sum of the all elements? solution Let $$a_i$$ or A be the list of the given n elements. Let $$b_j$$ be the list of the elements to add the A list. (\sum_{i}a_i

solution

Check a letter appearance

First, check all of the middle letters, which all letters other than the first and last consecutive segment of letters.

If a letter in middle letter appears more than one input string, it is impossible to construct the megatower.