Skip to content

Commit ff89d41

Browse files
authored
Add problem statement for GCD summation challenge
Added problem description, input/output format, constraints, and sample cases for the summation problem involving GCD.
1 parent 6ddadb3 commit ff89d41

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
## Problem Description
2+
3+
You are given a single integer `N`.
4+
5+
You are asked to compute the following summation:
6+
7+
Σ(i=1 to N) Σ(j=1 to N) Σ(k=1 to i) Σ(l=1 to j) (gcd(k, i) × gcd(l, j) × gcd(i, j))
8+
9+
Output the value of this summation **modulo 1000000007**.
10+
11+
---
12+
13+
## Input Format
14+
15+
- The input consists of a single integer `N`.
16+
17+
---
18+
19+
## Output Format
20+
21+
- Output the value of the summation modulo `1000000007`.
22+
23+
---
24+
25+
## Constraints
26+
27+
- 1 ≤ N ≤ 10^6
28+
29+
---
30+
31+
32+
## Sample Input 1
33+
34+
```
35+
2
36+
```
37+
---
38+
39+
## Output
40+
41+
```
42+
25
43+
```
44+
---
45+
46+
## Sample Input 2
47+
48+
```
49+
8
50+
```
51+
---
52+
53+
## Output
54+
55+
```
56+
13348
57+
```
58+
---
59+
60+
[PROBLEM LINK](https://www.codechef.com/problems/YETGCD?tab=statement)

0 commit comments

Comments
 (0)