blob: b3eddf4630de14d7d93372f75f8e6b4892761dbe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
positions = (2,4,6,8,10,12,14)
result = "1_2_3_4_5_6_7_8_9_0"
number = 1000000030
state = True
while number <= 3162277630:
number += 40 if state else 60
state = not state
found = True
square = str(number**2)
for i in positions:
if square[i] != result[i]:
found = False
break
if found:
break
print number
|