Commit f46bb7ff by BellCodeEditor

auto save

parent 34785f5c
num=0
pp=[]
for i in range(0,1001,2):
k=str(i)
p=[]
for j in k:
p.append(int(j))
if sum(p)==10:
pp.append(i)
num+=1
print(num)
print(pp)
\ No newline at end of file
# print(bin(5))
# print(int('1111',2))
# print(hex(25))
# print(int('0x33f',16))
# print(oct(33))
# print(int('343f',5))
a=['a','c','d','c']
b=input()
while b in a:
a.remove(b)
print(a)
\ No newline at end of file
a=[1,2,5]
num=0
for i in range(1,26):
for j in range(1,26):
for k in range(1,11):
if ((i*a[0]+j*a[1]+k*a[2])==50) and (i+j+k==25):
num+=1
print(i,j,k)
print(num)
for i in range(1,1001):
sum=0
for j in range(1,i):
if i%j==0:
sum+=j
if sum==i:
print(i)
num=0
pp=[]
for i in range(100,1000):
k=str(i)
p=[]
for j in k:
p.append(int(j))
if sum(p)==7:
pp.append(i)
num+=1
print(num)
print(pp)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment