#17486: Python


jay1060920909@gmail.com (Jay Chen)

School : 桃園市立大成國民中學
ID : 84276
IP address : [220.132.71.148]
Last Login :
2019-04-14 21:41:28
a040. 阿姆斯壯數 | From: [220.132.71.148] | Post Date : 2019-04-14 20:46

all_number = []
split_number = []
number = []
n = []
yn = []

start = int(input('請輸入開始值:'))
end = int(input('請輸入結束值'))

for i in range(start, end):
all_number.append(int(i))

all_number = [str(all_number) for all_number in all_number]

for i in range(len(all_number)):
split_number.append(list(all_number[i]))


for i in range(len(split_number)):
split_number[i] = [int(split_number[i]) for split_number[i] in split_number[i]]
number.append(split_number[i])

for i in range(len(number)):
for j in range(len(number[i])):
number[i][j] = number[i][j]**len(number[i])

for i in range(len(number)):
n.append(sum(number[i]))

all_number = [int(all_number) for all_number in all_number]

for i in range(len(n)):
if n[i] == all_number[i]:
yn.append(n[i])

if len(yn) >= 1:
for i in range(len(yn)):
print(yn[i],end=' ')
else:
print('none')

 
#17489: Re:Python


asnewchien@gmail.com (david)

School : Not Student
ID : 68108
IP address : [1.168.28.115]
Last Login :
2019-06-25 10:55:52
a040. 阿姆斯壯數 | From: [61.223.53.154] | Post Date : 2019-04-14 21:21

這樣能 AC 嗎

 
#17490: Re:Python


jay1060920909@gmail.com (Jay Chen)

School : 桃園市立大成國民中學
ID : 84276
IP address : [220.132.71.148]
Last Login :
2019-04-14 21:41:28
a040. 阿姆斯壯數 | From: [220.132.71.148] | Post Date : 2019-04-14 21:35

這樣能 AC 嗎




這是在編輯器寫的

 

 
#17491: Re:Python


jay1060920909@gmail.com (Jay Chen)

School : 桃園市立大成國民中學
ID : 84276
IP address : [220.132.71.148]
Last Login :
2019-04-14 21:41:28
a040. 阿姆斯壯數 | From: [220.132.71.148] | Post Date : 2019-04-14 21:35

這樣能 AC 嗎




不知道可不可以

 
ZeroJudge Forum