We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 704b3f8 commit 571702aCopy full SHA for 571702a
code/cartalk3.py
@@ -47,6 +47,9 @@ def num_instances(diff, flag=False):
47
count = 0
48
while True:
49
mother = daughter + diff
50
+
51
+ # assuming that mother and daughter don't have the same birthday,
52
+ # they have two chances per year to have palindromic ages.
53
if are_reversed(daughter, mother) or are_reversed(daughter, mother+1):
54
count = count + 1
55
if flag:
0 commit comments