package ert; public class bb { public static void main(String[] args) { int n=100,ge,shi,bai; while(n<=999){ ge=n%10; shi=n/10%10; bai=n/100; if(ge*ge*ge+shi*shi*shi+bai*bai*bai==n) System.out.println(n); n++; } } }
package zx; import java.util.Scanner; public class qq { public static void main(String[] args){ for(int n=1;n<=6;n++){ for(int m=1;m<=n;m++){ System.out.print(m); } System.out.println(); } } } package zx; import java.util.Scanner; public class qq { public static void main(String[] args){ for(int n=1;n<=7;n++){ for(int m=1;m<=7;m++){ System.out.print(m); } System.out.println(); } } } package zx; import java.util.Scanner; public class qq { public static void main(String[] args){ for(int n=1;n<=6;n++){ for(int m=6;m>0;m--){ if(m>n){ System.out.print(""); } else{ System.out.print(m); } } System.out.println(); } } } package zx; import java.util.Scanner; public class qq { public static void main(String[] args){ for(int n=6;n>0;n--){ for(int m=6;m>0;m--){ if(m>n){ System.out.print(""); } else{ System.out.print(m); } } System.out.println(); } } }
package ert; import java.util.Scanner; public class bb { public static void main(String[] args){ Scanner scan = new Scanner(System.in); System.out.println("请输入年月日"); int year = scan.nextInt(); int month = scan.nextInt(); int day = scan.nextInt(); int sum = 0; switch(month - 1){ case 11:sum += 30; case 10:sum += 31; case 9:sum += 30; case 8:sum += 31; case 7:sum += 31; case 6:sum += 30; case 5:sum += 31; case 4:sum += 30; case 3:sum += 31; case 2:sum += 28; case 1:sum += 31; case 0:sum += day; } if(month > 2){ if(year % 400 == 0 || year % 4 == 0 && year % 100 !=0){ sum++; System.out.println(sum); } } } }
package zx; import java.util.Scanner; public class qq { public static void main(String[] args){ int a,b,c,d,x; int m=Integer.parseInt(args[0]); a=m/1000; b=m/100%10; c=m/10%10; d=m%10; x=d*1000+c*100+b*10+a; System.out.println("反转后的数为:"+x); } }