Yuanfang is puzzled with the question below: There are n integers, a 1, a 2, -, a n. The initial values of them are 0. There are four kinds of operations. Operation 1: Add c to each number between a x and a y inclusive. In other words, do transformat
public class Three_03 { public static void main(String[] args) { for(int i=100;i<1000;i++){ int a=i%10; int b=i/10%10; int c=i/100; if((a*a*a+b*b*b+c*c*c)==i){ System.out.println(i); }else{ continue; } } }}
num = 100 while num <= 999: a = num % 10 #取个位数 b = num // 10 % 10 #取十位数 c = num // 100 #取百位数 if num == a**3 + b**3 + c**3: print (num) num += 1 #python不支持 num++ 之类的写法