37,738
社区成员
发帖
与我相关
我的任务
分享
a = int(num)%4
if a: return False
b = int(num)%100
if b: return True
c = int(num)%400
return False if c else True
Z = raw_input('Enter the 0<Num<100:')
X = int(Z)
b = X%25 #或1美分零钱
b1 = X/25 #25美分数量
c = b%10
c1 = b/10 #10美分数量
d = c%5 #1美分数量
d1 = c/5
e = b%5 # 零钱仅多于5美分时候的 1美分数量
e1 = b/5 # 零钱仅多于5美分时候的 5美分数量
if b>10:
print '%d 个25美分'%b1
if c>5:
print '%d 个10美分'%c1
print '%d 个5美分'%d1
else:
print '%d 个10美分'%c1
print '%d 个1美分'%d
elif b>=5 and b1>0:
print '%d 个25美分'%b1
print '%d 个5美分'%e1
print '%d 个1美分'%e
elif b>=5 and b1 == 0:
print '%d 个5美分'%e1
print '%d 个1美分'%e
else:
print '%d 个25美分'%b1
print '%d 个1美分'%b
HAHA = raw_input('')
Z = raw_input('Enter the 0<Num<100:')
X = int(Z)
b = X%25 #或1美分零钱
b1 = X/25 #25美分数量
c = b%10
c1 = b/10 #10美分数量
d = c%5 #1美分数量
d1 = c/5
e = b%5 # 零钱仅多于5美分时候的 1美分数量
e1 = b/5 # 零钱仅多于5美分时候的 5美分数量
if b>10:
print '%d 个25美分'%b1
if c>5:
print '%d 个10美分'%c1
print '%d 个5美分'%d1
else:
print '%d 个10美分'%c1
print '%d 个1美分'%d
elif b>5 and b1>0:
print '%d 个25美分'%b1
print '%d 个5美分'%e1
print '%d 个1美分'%e
elif b>5 and b1 == 0:
print '%d 个5美分'%e1
print '%d 个1美分'%e
else:
print '%d 个25美分'%b1
print '%d 个1美分'%b
HAHA = raw_input()
num = raw_input('Enter a year:')
a = int(num)%4
b = int(num)%100
c = int(num)%400
if a == 0:
if b == 0:
if c == 0:
print 'It is!'
else:
print "It's not"
else:
print 'It is!'
else:
print "It's not"
a = raw_input()