C) Mario and his pipes

Problem Name:
C) Mario and his pipes
Site:HackerEarth
Links:
Tags:
Problem setters: