rearrange
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export type Iterableify<T> = { [K in keyof T]: Iterable<T[K]> } | |
/** | |
* Iterates over multiple iterable objects in parallel. | |
* | |
* Stops iteration when any of the iterators is done. | |
*/ | |
export function* zip<T extends Array<any>>( | |
...toZip: Iterableify<T> | |
): Generator<T> { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
I am currently an English teacher at some schools in Japan and recently my students have been learning how to write the numbers in words in English. For example, if they were given the number 12 they are learning to write 'twelve'.
One of the questions I set the students was to find the number with the longest length (in characters; 4 would be bigger than 10 because four has more
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Constructs tuples of `never` of length 2^K for all 0 ≤ K and 2^(K - 1) ≤ N. | |
* The tuples are in decreasing order by their lengths. | |
* | |
* The placeholder type `never` is chosen because it lets us test the length, as | |
* opposed to a generic type, which may be extended by undefined, and give us | |
* unexpected results. | |
* | |
* This type should not be used directly; it is a support type for Tuple. | |
* |
This is the ninteenth puzzle in Matt Parker's Matt Parker's Maths Puzzles puzzle series
If you sum of the squares of the first 19 primes you get a multiple of 19.
Find another number n
that has the property that the sum of the squares of the
first n primes is a multiple of n
.
NewerOlder