續上面備注:這些都是最簡單的java的語言的實現
水仙花數是指一個
public class szsx {public static void main(String[] args){
for(int i=
int b=i/
int s=(i%
int g=i%
if((b*b*b+s*s*s+g*g*g==i)){
System
}
}}}
public class ten {
public static void main(String[] args){
for(int i=
System
}
int[] num=new int[]{
int sum=
for(int i=
if((num[i]&(num[i]
System
sum++;
System
System
}
}
System
}
}
public class szfib {
public static void main(String[] args){
int[] fib=new int[
fib[
for(int i=
fib[i]=fib[i
System
}
}}
暫時就這些吧
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25936.html