<font color=#0099ff size=4> After the partners read the problem description , Be sure to practice yourself first , Then go to see the blogger's code and problem-solving ideas , In order to improve their programming level , It all depends on self-consciousness !!!
print('100 To 1000 The number of all daffodils before is as follows :')
for i in range(100, 1000):
# Take a hundred 371 // 100 = 3
x = i // 100
# Take the tens 371 // 10 =3 7; 37 % 10 = 7
y = i // 10 % 10
# Take a single 371 % 10 = 1
z = i % 10
# Judge the position 、 ten 、 The sum of the hundreds of digit cubes is equal to the original number
if x ** 3 + y ** 3 + z ** 3 == i:
print(f'{i} It's Narcissus ')

print('100 To 1000 The number of all daffodils before is as follows :')
number = 100
while number < 1000:
# Take a hundred 371 // 100 = 3
x = number // 100
# Take the tens 371 // 10 =3 7; 37 % 10 = 7
y = number // 10 % 10
# Take a single 371 % 10 = 1
z = number % 10
# Judge the position 、 ten 、 The sum of the hundreds of digit cubes is equal to the original number
if x ** 3 + y ** 3 + z ** 3 == number:
print(f'{number} It's Narcissus ')
# Need to set up number Add one... At a time
number += 1

<font color=black size=5>2. Advanced programming player </font></br><font color=black size=3> When you have gradually mastered the key points of knowledge after basic practice , Go to this time <font color=red size=3> Learn data structures in special exercises 、 Algorithm basis 、 Fundamentals of computer </font> etc. . Start with the simple , If you feel up, do it in medium difficulty , And more difficult topics .<font color=red size=3> These three are the knowledge points that must be tested in the interview </font>, We can only insist on practicing more every day by ourselves , Refuse to lie flat and continue to brush questions , Continuously improve yourself to impact a satisfactory company .</font></br> Link address : Cattle from | Special exercises
<font color=black size=3> Speed up , Let's attack the big factory together , If you have questions, leave a message in the comment area to answer !!!