Python 81
[Python 100] Python 100
809*??=800*??+9*?? ??, 809*??8*??9*??3??809*??
(Python 2.0+)
#!/usr/bin/python
# -*- coding: UTF-8 -*-
a = 809
for i in range(10,100):
b = i * a
if b >= 1000 and b <= 10000 and 8 * i < 100 and 9 * i >= 100:
print b,' = 800 * ', i, ' + 9 * ', i
9708 = 800 * 12 + 9 * 12
[Python 100] Python 100
bihar
sbh***163.com
l1=[m for m in range(10,100/8+1)] l2=[m for m in range(12,1000/9+1)] for i in l1: if i in l2: k=i print 809*kbihar
sbh***163.com
415***[email protected]
#!/usr/bin/python # -*- coding: UTF-8 -*- def func(): m = 809 # 9 *??3 for i in range(1000): if i*9<1000: n=i #n for i in range(1,n): if i*8<100: #8*?? if i*809<10000: #809*?? if len(str(i*9)) > 2: #9*??3 if m*i==800*i+9*i: print i print "",m*i func()415***[email protected]
261***[email protected]
#!/usr/bin/pyhton # -*- coding: UTF-8 -*- for i in range(10,101): if 809 * i == 800 * i + 9 * i: if 8 * i < 100 : if 9 * i > 100 and 9 * i < 1000: print i ,809 * i261***[email protected]
NathanLee
nat***[email protected]
!
: x, range(10,100)forif and
Python3.x Python2.x
#!/usr/bin/python # -*- coding: UTF-8 -*- for i in range(10,100): if (809 * i >= 1000) and (8 * i <= 100) and (9 * i >= 100) and (809 * i == 800 * i + 9 * i): print(": {0}, 809{0}: {1}".format(i, 809 * i)): 12, 80912: 9708
NathanLee
nat***[email protected]