Problem

Source: 1998 Russia Problem #??

Tags: algebra



Two identical decks have 36 cards each. One deck is shuffled and put on top of the second. For each card of the top deck, we count the number of cards between it and the corresponding card of the bottom deck. What is the sum of these numbers? Sorry if this has been posted before but I would like to know if I solved it correctly. Thanks!