fork download
  1. # your code goes here
  2. f=0
  3. S='Song:'
  4. A='\nArtist:'
  5. l="Batman Theme,Neal Hefti,Na Na Hey Kiss Him Goodbye,Steam,Katamari Damacy,Yuu Miyake,Hey Jude,Beatles,Land of the 1000 Dances,Wilson Pickett,Africa,Toto".split(',')
  6. s=raw_input().lower()+" "
  7. n=s.count("na ")
  8. n*=n*3==len(s)
  9. if n>11:f=8
  10. if n==10:f=4
  11. if n==11:f=6
  12. if n<8or n==9:f=10
  13. if f:print S+l[f]+A+l[f+1]
  14. else:print S+l[0]+A+l[1]+"\n"+S+l[2]+A+l[3]
Success #stdin #stdout 0.01s 8976KB
stdin
na na na na na na na na na na
stdout
Song:Katamari Damacy
Artist:Yuu Miyake