No tags yet

No tag edit access

The problem statement has recently been changed. View the changes.

×
106. The equation time limit per test: 0.25 sec.
There is an equation ax + by + c = 0. Given a,b,c,x1,x2,y1,y2 you must determine, how many integer roots of this equation are satisfy to the following conditions : x1<=x<=x2, y1<=y<=y2. Integer root of this equation is a pair of integer numbers (x,y).
Input Input contains integer numbers a,b,c,x1,x2,y1,y2 delimited by spaces and line breaks. All numbers are not greater than 10
Output Write answer to the output.
Sample Input 1 1 -3 0 4 0 4
Sample Output 4 |

Codeforces (c) Copyright 2010-2023 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/07/2023 09:05:42 (f1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|