Smallest triangular number larger than p | C # code to find the bucket to choose for picking flowers out of it ; Driver code
using System ; class GFG { static int findBucketNo ( int p ) { return ( int ) Math . Ceiling ( ( Math . Sqrt ( 8 * p + 1 ) - 1 ) / 2 ) ; } static public void Main ( ) { int p = 10 ; Console . WriteLine ( findBucketNo ( p ) ) ; } }