Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fin = open('input.txt', 'r', encoding='utf-8')
- fout = open('output.txt', 'w', encoding='utf-8')
- solution = 0
- a = int(fin.readline())
- b = int(fin.readline())
- c = int(fin.readline())
- d = int(fin.readline())
- e = int(fin.readline())
- for x in range(1001):
- if x - e != 0 and a * x ** 3 + b * x ** 2 + c * x + d == 0:
- solution += 1
- print(solution, file=fout)
- fin.close()
- fout.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement