Advertisement
Korotkodul

tr10.n9

Jun 10th, 2023
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. k = 0
  2. with open('N9.txt') as f:
  3.     lines = f.readlines()
  4.     for line in lines:
  5.         a = [int(i) for i in line.split()]
  6.         if len(a) - len(set(a)) < 1:
  7.             continue
  8.         S = 0
  9.         for i in a:
  10.             if a.count(i) == 1:
  11.                 S += i
  12.         if S % 2 == 1:
  13.             k += 1
  14.             #print(a)
  15. print(k)
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement