n=int(input())sum=0for i in range (1,n+1): a=int(input()) if a%6==0: sum+=aprint (sum)
4 36 12 5 3
48
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!