fork download
  1.  
  2. def orig(s):
  3. input=lambda: s
  4. x,*l=input().split()
  5. d=-((int(x)*8-sum(('vexuobcl'+2*'clornielatrisuke'+4*'Ratahoesuhihie').count(q[-3:-1])*(1-12*(q[0]=="N"))for q in l))//8)
  6. print((1,"You must construct %s additional pylon"%d+'s!'[d<2:])[d>0])
  7.  
  8. def new(s):
  9. input=lambda: s
  10. x,*l=input().split()
  11. d=-((int(x)*8-sum((('vexuobcl'+2*'clsuie'+4*'Ratahoiesuhihi').count(q[-3:-1])*(1-12*(q[0]=="N"))or 2)for q in l))//8)
  12. print((1,"You must construct %s additional pylon"%d+'s!'[d<2:])[d>0])
  13.  
  14. s="0 Nexus MothershipCore Mothership Carrier"
  15. orig(s)
  16. new(s)
Success #stdin #stdout 0.02s 9984KB
stdin
Standard input is empty
stdout
You must construct 1 additional pylon!
You must construct 1 additional pylon!