f=->s{i=0;s.gsub(/./){$&*i+=1}} while gets puts f.call($_)end
Hello codegolf A and B
Heelllllllooooo coodddeeeegggggoooooolllllllffffffff A aaannnnddddd BBBBBBB
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!