Skip to content

Commit fe841c7

Browse files
committed
Solution 003 added
1 parent 46ba3bd commit fe841c7

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include <bits/stdc++.h>
2+
using namespace std;
3+
4+
int main() {
5+
// your code goes here
6+
int N;
7+
cin>>N;
8+
int result=0;
9+
for(int i=1;i<=N;i++){
10+
for(int j=1;j<=N;j++){
11+
for(int k=1;k<=i;k++){
12+
for(int l=1;l<=j;l++){
13+
int x=(__gcd(k,i))*(__gcd(l,j))*(__gcd(i,j));
14+
result+=x;
15+
}
16+
}
17+
}
18+
}
19+
cout<<result<<endl;
20+
}

0 commit comments

Comments
 (0)