There was a bored person in the group who talked about a math problem.
So I also tried programming.
The Code is as follows:
Int A = 0, B = 0, c = 0, D = 0, x = 0, F, G, H, I, ABCD, fghi; </P> <p> for (a = 1; A <10; A ++) <br/> {<br/> for (B = 1; B <10; B ++) <br/>{< br/> if (a = B) <br/>{< br/> continue; <br/>}</P> <p> for (C = 1; C <10; C ++) <br/>{< br/> if (a = c | B = C) <br/>{< br/> continue; <br/>}</P> <p> for (D = 1; D <10; D ++) <br/>{< br/> If (A = d | B = d | C = d) <br/>{< br/> continue; <br/>} </P> <p> for (x = 1; x <10; X ++) <br/>{< br/> If (A = x | B = x | D = x | C = x) <br/>{< br/> continue; <br/>}< br/> ABCD = a + B * 10 + C * 100 + D * 1000; <br/> fghi = ABCD * X; </P> <p> // a four-digit method, clever application of the Division and Division <br/> F = fghi/1000; <br/> G = (fghi % 1000)/100; <br/> H = (fghi % 1000) % 100)/10; <br/> I = (fghi % 1000) % 100) % 10; </P> <p> // determines whether the number in the result contains A, B, C, and D and the result does not contain 0. The result is confirmed to be 4 digits.. <Br/> If (fghi. tostring (). contains (. tostring () | fghi. tostring (). contains (B. tostring () | fghi. tostring (). contains (C. tostring () | fghi. tostring (). contains (X. tostring () | fghi. tostring (). contains (D. tostring () | fghi. tostring (). length> 4 | fghi. tostring (). contains ("0") <br/>{< br/> continue; <br/>}</P> <p> else <br/>{< br/> If (F! = G & F! = H & F! = I & G! = H & G! = I & H! = I) <br/>{< br/> response. write (fghi + "" + ABCD + "" + x); <br/> response. write ("<br/> "); </P> <p >}< br/>}</P> <p >}< br/>}
The clever use of C # Is that the result is converted to a string. then, the contains (string a) method is applied to check whether the query result contains the four digits in the previous section and the value is 0. The value is determined by the lenght attribute of the string, whether the number exceeds 4 digits.