NIKOLAY_TETUS

Untitled

Jun 21st, 2021
612
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. f = open("27A.txt")
  2.  
  3. dataAmount = int(f.readline())
  4.  
  5. buf = []
  6.  
  7. sumNaim = 0
  8. sumNaib = 0
  9. for i in range(0, dataAmount):
  10.     buf = list(map(int, f.readline().split()))
  11.     if buf[1] % 2 == 0:
  12.         continue
  13.     buf.sort()
  14.     sumNaim += buf[0]
  15.     sumNaib += buf[1]
  16.  
  17. print(sumNaim, sumNaib)
  18.    
  19.  
RAW Paste Data