Home > other >  Beginners python (don't understand to ask)
Beginners python (don't understand to ask)

Time:10-11

A friend can help explain the daffodils for this solution, please thank you
For I in range (100100) : the sum=0 temp=I while temp: sum=sum + (temp % 10) * * 3 # this cycle is difficult to understand, essentially take over and floor in addition to the temp//=10 if sum==I: print (I)

CodePudding user response:

This format you let a person afflictive ah, text editing a code block of input, you try to modify

CodePudding user response:

Temp % 10, is to get a single
Temp//=10 floor in addition to, and then cycle back % 10, is to get ten digits,
After one hundred, the temp is 0, the while loop,
This can be used to evaluate all of the three digits,

CodePudding user response:

refer to the second floor nangongxiaobai response:
\ % 10, is to get a single
Temp//=10 floor in addition to, and then cycle back % 10, is to get ten digits,
After one hundred, the temp is 0, the while loop,
This can be used to evaluate all of the three digits,
thank??
  • Related