fork download
  1. //#define _CRT_SECURE_NO_WARNINGS
  2. #include <iostream>
  3. #include<bits/stdc++.h>
  4. #include<fstream>
  5. #include<cstdio>
  6. typedef long long ll;
  7. using namespace std;
  8.  
  9. void winter_is_coming()
  10. {
  11. std::ios_base::sync_with_stdio(0);
  12. cin.tie(NULL); cout.tie(NULL );
  13. }
  14. void file()
  15. {
  16. #ifndef ONLINE_JUDGE
  17. freopen("in.txt", "r", stdin);//freopen("out.txt", "w", stdout);
  18. #endif
  19. }
  20. ll a,b,c,ans=0;
  21. map<ll,ll>mp;
  22. ll getdiv(ll num)
  23. {
  24. ll div=1;
  25. if(num==1) return div;
  26. for(int i=2;i*i<=num;i++)
  27. {
  28. if(num%i==0)
  29. {
  30. div++;
  31. if(num%(num/i)==0 && i != num/i) div++;
  32. }
  33. }
  34. div++;
  35. return div;
  36. }
  37. int main()
  38. {
  39. winter_is_coming();
  40.  
  41. cin>>a>>b>>c;
  42. for(int i=1;i<=a;i++)
  43. {
  44. for(int j=1;j<=b;j++)
  45. {
  46. for(int k=1;k<=c;k++)
  47. {
  48. if(!mp[i*j*k])
  49. {
  50. mp[i*j*k]=getdiv(i*j*k);
  51. }
  52. ans+=(mp[i*j*k]);
  53. ans%=1073741824;
  54. }
  55. }
  56. }
  57. cout<<ans<<"\n";
  58.  
  59. return 0;
  60. }
  61.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
0