甲說前兩位相同,乙說後兩位相同,丙說四位的車牌號剛好是一個數的平方,這個車牌號是多少?
using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int k, c; for (int i = 1; i < 10; i++) for (int j = 0; j < 10; j++) if (i != j) { k = i * 1000 + i * 100 + j * 10 + j; for (c = 31; c < k; c++) if (c * c == k) Console.WriteLine(k); } } } }