Cody

Problem 42833. Return the sequence element I

  • Created by HH

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

Solution Stats

71.74% Correct | 28.26% Incorrect
Last Solution submitted on Mar 23, 2020

Problem Comments

Solution Comments

Problem Recent Solvers20

Suggested Problems

More from this Author34

Problem Tags