Smallest triangular number larger than p | javascript code to find the bucket to choose for picking flowers out of it ; Driver code
function findBucketNo ( p ) { return Math . ceil ( ( Math . sqrt ( 8 * p + 1 ) - 1 ) / 2 ) ; } let p = 10 ; document . write ( findBucketNo ( p ) ) ;