The number of daffodils is the number of n (3) digits, which is equal to the sum of the n power of each number. for example, 153 is a daffodils, 1531 + 5 + 3. write a program to solve all the daffodils less than 1000. no DECLAREiINTSETi10WHILEi1000BEGINIFPOWER (floor (i100), 3) + POWER (floor (i10) % 10, 3) + POWER (I % 10, 3) iPRI
The number of daffodils is the number of n (= 3) digits, which is equal to the sum of the n power of each number. for example, 153 is a daffodils, 153 = 1 + 5 + 3. write a program to solve all the daffodils less than 1000. no DECLARE I INTSET I = 10 WHILE i1000BEGINIF POWER (floor (I/100), 3) + POWER (floor (I/10) %) + POWER (I %) = iPRI
The number of daffodils is the number of n (> = 3) digits, which is equal to the sum of the n power of each number. for example, 153 is a daffodils, 153 = 1 Gbit/s + 5 Gbit/s + 3 Gbit/s. write a program to solve all the daffodils less than 1000. <无>
DECLARE i INTSET i=10WHILE i<1000BEGINIF POWER(floor(i/100),3)+POWER(floor(i/10)%10,3)+POWER(i%10,3)=iPRINT iEND