Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one instance of the number 1 is followed by two instances of the number 2, followed by three instances of the number 3, and so on.
Example 1:
x = 5
y = 3
Example 2:
x = 105
y = 14
"...return a positive integer, y, which is the xth term ..." in de description.
I have a single line of code in my solution -- how is yours so small!?!
All your base are belong to us
425 Solvers
Similar Triangles - find the height of the tree
156 Solvers
Back to basics 21 - Matrix replicating
905 Solvers
Implement simple rotation cypher
806 Solvers
42 Solvers