Python 29

Python 100 [Python 100] Python 100

5

(Python2.x)

#!/usr/bin/python # -*- coding: UTF-8 -*- x = int(raw_input(":\n")) a = x / 10000 b = x % 10000 / 1000 c = x % 1000 / 100 d = x % 100 / 10 e = x % 10 if a != 0: print "5 ",e,d,c,b,a elif b != 0: print "4 ",e,d,c,b, elif c != 0: print "3 ",e,d,c elif d != 0: print "2 ",e,d else: print "1 ",e

(Python3.x)

#!/usr/bin/python x = int(input(":\n")) a = x // 10000 b = x % 10000 // 1000 c = x % 1000 // 100 d = x % 100 // 10 e = x % 10 if a != 0: print ("5 ",e,d,c,b,a) elif b != 0: print ("4 ",e,d,c,b) elif c != 0: print ("3 ",e,d,c) elif d != 0: print ("2 ",e,d) else: print ("1 ",e)

:
23459
5  9 5 4 3 2
:
3472
4  2 7 4 3

Python 100 [Python 100] Python 100