Flowchart Logic 063

 Coding Problem Keys 

 Flowchart Logic 063 

 Problem Statement 

Please fill in the lines of code to implement the logic present in the flowchart.

 Note: Max Execution Time Limit: 50 millisecs 

 Solution 

 Programming Language: Python 3 Language 

num=int(input())
val=0;count=0
while(num>0):
    if num%10!=0:
        val=(val*10)+(num%10)
    else:
        count+=1
    num//=10
else:
    while(count>0):
        val*=10
        count-=1
    else:
        print(val)

# Published By PKJCODERS

 (Note: Incase If the code doesn't Pass the output kindly comment us with your feedback to help us improvise.) 

Comments

Popular Posts

String Rotation Odd and Even Positions

Vaccine Distribution

Reversed Sum of Pairs

Desktop Products

Function middle - CTS Pattern

Flowchart Logic 047

Find Maxima/Minima