|
||||||||||
2018Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3451 Accepted Submission(s): 1605 Problem Description Given $a, b, c, d$, find out the number of pairs of integers $(x, y)$ where $a \leq x \leq b, c \leq y \leq d$ and $x \cdot y$ is a multiple of $2018$. Input The input consists of several test cases and is terminated by end-of-file. Each test case contains four integers $a, b, c, d$. Output For each test case, print an integer which denotes the result. ## Constraint * $1 \leq a \leq b \leq 10^9, 1 \leq c \leq d \leq 10^9$ * The number of tests cases does not exceed $10^4$. Sample Input
Sample Output
Source | ||||||||||
|