# Randomized Songs

Algebra Level pending

Adam loves to listen to songs, and he will always play the songs in random mode.

Random mode will randomize his songs in his playlist, according to the length of song that is currently playing. For example, if he is listening to a song that has 178 seconds and the song is the 1st song in his 58-song playlist, then the next song will be the $$1 + 178 \pmod{58}$$-th song, that is the 5th song.

Now, Adam has 239 songs in his own playlist and he is listening to the 47th song that has the song length 5:38. The song that will be played next is the $$x$$-th song in the playlist. Find the value of $$x$$.

×