Minimum number of letters needed to make a total of n | C ++ implementation of the approach ; Function to return the minimum letters required to make a total of n ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; int minLettersNeeded ( int n ) { if ( n % 26 == 0 ) return ( n / 26 ) ; else return ( ( n / 26 ) + 1 ) ; } int main ( ) { int n = 52 ; cout << minLettersNeeded ( n ) ; return 0 ; }