broadbringer

Untitled

Feb 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. with open('input.txt', 'r') as InputFile:
  2.          N,a, b, c = InputFile.read().split()
  3. N = int(N);a = int(a);b = int(b);c = int(c);
  4. if a+b ==N or b+c==N or a+c == N:
  5.     value = 2
  6. if a or b or c == N :
  7.     value = 1
  8. if a+b+c == N:
  9.     value = 3
  10. with open('output.txt', 'w') as OutputFile:
  11.    OutputFile.write(str(value))
Advertisement
Add Comment
Please, Sign In to add comment