Facebook
From hung, 2 Months ago, written in HTML5.
Embed
Download Paste or View Raw
Hits: 189
  1. with open('thamquan.inp') as f:
  2.     s = f.read()
  3. b = s.split()
  4. a = list(map(int,b))
  5. if a[0]==2 or a[0]==3 or a[0]==4 or a[0]==5 or a[0]==6:
  6.     if a[1]>=6 and a[2]<=12:
  7.         tpt = (a[2]-a[1])*6
  8.     else:tpt = (a[2]-a[1])*10
  9. else:
  10.     if a[1]>=6 and a[2]<=12:
  11.         tpt = (a[2]-a[1])*10
  12.     else:tpt = (a[2]-a[1])*15
  13. if a[2]>=18:tpt = (a[2]-a[1])*20
  14. with open('thamquan.out','w') as f:
  15.     f.write(str(tpt))
  16.