Login

All Problems

Problem title

Difficulty

Avg time to solve

Digits Decoding

Moderate

25 mins

Execution Time

Moderate

15 mins

Glowing Bulbs

Hard

30 mins

Optimize The Code

Moderate

30 mins

Number Pattern

Easy

--

QuickSort On Doubly Linked List

Hard

20 mins

Prime Adjacent

Moderate

10 mins

Ninja And Divisible Array

Moderate

15 mins

Decimal to Octal Conversion

Easy

15 mins

Reaching Points

Moderate

30 mins

Problem

Submissions

0

Avg. time to solve

30 min

Success Rate

60%

Problem Statement

```
RES = 0
FOR(i -> A to B) {
FOR(j -> C to D) {
ADD (i ^ j) to RES;
}
}
PRINT(RES)
```

```
The first line of the input contains a single integer 'T', representing the number of test cases.
The first line of each test case contains 4 space-separated integers, representing the integers ‘A’, ‘B’, ‘C’, and ‘D’.
```

```
For each test case, print the result of the code modulo 1000000007.
Print the output of each test case in a separate line.
```

```
You do not need to print anything, it has already been taken care of. Just implement the given function.
```

```
1 <= T <= 10
1 <= A <= B <= 5*10^3
1 <= C <= D <= 5*10^3
Time Limit : 1 sec
```

```
2
2 3 7 8
1 1 1 1
```

```
30
0
```

```
For the first test case :
The operations performed will be : 2^7 + 2^8 + 3^7 + 3^8 = 5 + 10 + 4 + 11 = 30
For the second test :
The operations performed will be : 1^1 + 1^1 = 0 + 0 = 0
```

```
2
3 5 4 5
1 2 3 4
```

```
15
14
```

Console

Sample Test Case

Custom Test Case

Download Test Cases

Test Case 1

Test Case 2

Test Case 3

Saving Code...

Full Screen Mode

Change Language

Change Theme

Solution submission not allowed

Save Code

Reset Code