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-2021 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/23/2021 02:28:06 (i1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|