Created
April 17, 2017 13:00
-
-
Save KhaledElshamy/92f6b11ebee0a160902a68cbc9a4a470 to your computer and use it in GitHub Desktop.
B. Easy Number Challenge (Codeforces)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std ; | |
#define size 1000001 | |
int main() { | |
unsigned long long a,b,c,d[1000001]={0},count=0; | |
for(int i=1;i<size;i++) | |
for(int j=i;j<size;j+=i) | |
++d[j]; | |
cin>>a>>b>>c; | |
for(int i=1;i<=a;i++) | |
for(int j=1;j<=b;j++) | |
for(int k=1;k<=c;k++) | |
count+=d[i*j*k]; | |
cout<<count<<endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment