Lx Package Penalty for;
/ ** Classic T questions:
-
Find all the numbers from 100 to 999 between daffodils
-
Narcissistic number: 3 power on the power of the single digits + 3 + 3 power on the hundreds digit on the ten-digit numbers themselves =
-
如123=1³+2³+3³;
/
public class ForTest {
public static void main(String[] args) {
//设置循环
for (int num = 100; num <= 999; num++) {
int ge = num % 10;
int shi = num%100/10;//num/10%10;如125/10=12%10=2
int bai = num/100;
int result = gegege+shishishi+baibai*bai;
if (result==num){
System.out.println(num);} }
}
}