Home > other >  Palindrome blue cup's basic training
Palindrome blue cup's basic training

Time:10-15

Subject problem description
1221 is a very special, it's from the left side read and from the right side is the same, programming for all such four decimal number,
The output format
By size in the order of the output meet the conditions of four decimal number,

The code
For I in range (1000100, 00) :
A=list (STR) (I)
If (int (a [0])==int (a) [3]) & amp; (int (a [1])==int (a) [2]) :
C="'. Join (a)
Print (int) (c)


I hope it can help you
  • Related