println System.in.readLines()*.split(" ")*.collect{it as int}.collect{line->"${line[0]}@${line[1]}=${(Integer.toBinaryString(line[1]).split('') as List).collect{it=='0'?0:line[0]}.inject(0){sum,it->sum*2^it}}"}.join("\n")
1 2 9 0 6 1 3 3 2 5 7 9 13 11 5 17 14 13 19 1 63 63
1@2=2 9@0=0 6@1=6 3@3=5 2@5=10 7@9=63 13@11=127 5@17=85 14@13=70 19@1=19 63@63=1365
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!