fork download
  1. # your code goes here
  2.  
  3. i=raw_input()
  4. if i[1]>"9":print"2CH4 + 4O2 > 4H2O + 2CO2"
  5. else:O=3*int(i[1:i.find('H')])+1;C=2*int(i[1:i.find('H')]);print"2"+i+" + "+str(O)+"O2"+" > "+i[i.find('H')+1:]+"H2O"+ " + "+str(C)+"CO2"
Success #stdin #stdout 0.01s 9016KB
stdin
C3H8
stdout
2C3H8 + 10O2 > 8H2O + 6CO2