Append '0' ( N - 1 ) times to 1
String smallest = "1" + strings ( ( N - 1 ) , '0' ) ; return smallest ; } private static String strings ( int N , char c ) { String temp = " " ; for ( int i = 0 ; i < N ; i ++ ) { temp += c ; } return temp ; }