Posts

pattern ####/\#### ###/##\### ##/#/\#\## #/#/##\#\# /#/#/\#\#\ \#\#\/#/#/ #\#\##/#/# ##\#\/#/## ###\##/### ####\/####

 Input :  5 Output: ####/\#### ###/##\### ##/#/\#\## #/#/##\#\# /#/#/\#\#\ \#\#\/#/#/ #\#\##/#/# ##\#\/#/## ###\##/### ####\/####  Input :  11 Output: ##########/\########## #########/##\#########  ########/#/\#\########  #######/#/##\#\#######  ######/#/#/\#\#\######  #####/#/#/##\#\#\#####  ####/#/#/#/\#\#\#\####  ###/#/#/#/##\#\#\#\###  ##/#/#/#/#/\#\#\#\#\##  #/#/#/#/#/##\#\#\#\#\#  /#/#/#/#/#/\#\#\#\#\#\  \#\#\#\#\#\/#/#/#/#/#/  #\#\#\#\#\##/#/#/#/#/#  ##\#\#\#\#\/#/#/#/#/##  ###\#\#\#\##/#/#/#/###  ####\#\#\#\/#/#/#/####  #####\#\#\##/#/#/#####  ######\#\#\/#/#/######  #######\#\##/#/#######  ########\#\/#/########  #########\##/#########  ##########\/########## Solution: a= int ( input ()) for i in range ( 1 ,a+ 1 ): for j in range ( 1 ,a+ 1 -i): print ( "#" , end = "" ) for k in range ( 1 ,i+ 1 ): if (k% 2 != 0 ): print ( "/"...

Geek and Allies

Image
  Input:  N = 13 Output: 12 Explanation: Identification codes of Geek's allies are 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12 and 13. Person with Identification code 10 cannot be an ally as 10 is not the smallest permutation of the digits '0' and '1'. Example 2: Input: N = 500 Output: 184

ZOHO ROUND 2 CODING QUESTION

ZOHO ROUND 2 CODING QUESTION Input:n = 4      Output:           0           101           21012           3210123

Write a program to give the following output for the given input

Question:  Eg 1: Input: a1b10           Output: abbbbbbbbbb Eg: 2: Input: b3c6d15           Output: bbbccccccddddddddddddddd      The number varies from 1 to 99.