This year's Arbor Day (March 12, 2012), Xiao Ming and his uncle and his small friends to plant trees together.
Rest, Xiao Ming's classmate asked his uncle how old, his uncle said: "I said a topic, see you who first guess!" ”
"The day I was born together to spell a 8-digit number (month, day less than two before 0) just can be today's year, month, day evenly divisible! ”
He thought, adding: "Give another hint, I was born in June." ”
According to this information, please help Xiao Ming to calculate his uncle's date of birth.
The answer is written in the "answer. txt", do not write here!
The format is a 8-digit number that is connected by day and month.
For example, if it is June 12, 1948, write: 19480612
Package Bluebriage;public class Planttreesguessbirthday {public static void main (string[] args) {new Planttreesguessbirthday (). Run ();} public void Run () {int n=20120312; String s= ""; for (int i=19000601;i<=n;i++) {s= "" +i;//convert I to string int day=integer.parseint (s.substring (6));//day int Month =integer.parseint (s.substring (4,6));//month if (day>=1&&day<=31&&month>=1&&month <=12&&i%2012==0&&i%12==0) {System.out.println (i);}}}}
19200516
19520424
19550604
19870512
Arbor Day skillfully guessing birthday problem