Sum of Powers of 3

Problem Name:
Sum of Powers of 3
Site:HackerEarth
Links:
Tags:
Problem setters: