1. 22.Time is money

    st="00:00:00"
    et="00:00:10"
    
    print abs(int(st.split(':')[0])*3600 + int(st.split(':')[1])*60 + int(st.split(':')[2])-(int(et.split(':')[0])*3600 + int(et.split(':')[1])*60 + int(et.split(':')[2])))
    
    read more
  2. 16.Print the RMB amount

    #coding:utf-8
    
    # method 1
    a=-20700450
    bigFormat={0:u'零',1:u"壹",2:u"贰",3:u'叁',4:u'肆',5:u'伍',6:u'陆',7:u'柒',8:u'捌',9:u'玖'}
    unit =['',u'拾',u'佰',u'仟',u'万']
    
    rmb=""
    if a!=abs ...
    read more
  3. 12.The parity of the non zero at the end

    def count(num,i):
        if num==0:
            return 0
        if num%i==0:
            return 1+count(num/i,i)
        else:
            return 0
    
    def countodd(list):
        count2=0
        count5=0
        for i in range(len(list)):
            count2 += count(list[i], 2)
            count5 += count(list[i], 5)
    
        if count2>count5:
            return 0 ...
    read more

« Page 20 / 23 »

blogroll

social