1. Title: Guessing riddles (fill in the blanks)
A puzzle on the Lantern Festival in village A:
Please guessing the Riddle = Please guess by the Light side
Xiao Ming thought, must be each Chinese character represents a number, different Chinese characters represent different numbers.
Please use the computer according to Xiao Ming's ideas, and then submit "please guessing" three words represented by the integer can.
Please submit your answers in the form of a browser in strict format.
Note: Submit only a 3-bit integer, and do not write additional content, such as descriptive text.
1 ImportJava.util.Scanner;2 //Guessing Riddles3 Public classmain{4 Public Static BooleanFintA[]) {//the relationship between A and B5 if(a[1]==a[4]){6 if(a[0]!=a[1]&&a[0]!=a[2]&&a[0]!=a[3]&&a[0]!=a[5]&&a[1]!=a[2]&&a[1]!=a[3 ]&&a[1]!=a[5]&&a[2]!=a[3]&&a[2]!=a[5]&&a[3]!=a[4]&&a[3]!=a[5])7 return true;8 }9 return false;Ten } One A Public Static voidMain (String args[]) { - inta,b,c[]=New int[6]; - for(inti=1;i<=9;i++) the for(intj=0;j<=9;j++) - for(intk=0;k<=9;k++) - if(i!=j&&i!=k&&j!=k) {//number A is a three-digit number consisting of three different digits -A= (i*10+j) *10+k;//The number of "Please guessing" represents +B=a*a;//"Please guess" the number represented by the light - if(b>100000&&b<1000000) {//if B is a 6-digit number + for(intl=5;l>=0;l--){ AC[l]=b%10; atB=b/10; - } - if(f (c) = =true&&c[0]==a/100&&c[5]== (A/10)%10) System.out.println (a); - } - } - } in}
Guessing Riddles
Answer: 897
Fourth session (13) Blue Bridge Cup Java Group B final real title