• Source
    1. #include <bits/stdc++.h>
    2. #include <numeric>
    3. #define REP(i, s, n) for (int i = s; i < n; ++i)
    4. #define rep(i, n) REP(i, 0, n)
    5. #define SORT(c) sort((c).begin(), (c).end())
    6. #define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())
    7.  
    8. #define IINF INT_MAX
    9. #define LLINF LLONG_MAX
    10. #define DEBUG false
    11. #define LL long long
    12. #define Dev 1000000007
    13.  
    14. // sort(a.begin(), a.end(), std::greater<int>());
    15. using namespace std;
    16.  
    17. int main()
    18. {
    19. int prime[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
    20. int n;
    21. cin >> n;
    22. map<int, int> dic;
    23. REP(i, 2, n + 1)
    24. {
    25. int num = i;
    26. int j = 0;
    27. while (num != 1)
    28. {
    29. if (num % prime[j] == 0)
    30. {
    31. dic[j]++;
    32. num /= prime[j];
    33. }
    34. else
    35. {
    36. j++;
    37. }
    38. }
    39. }
    40. int ans = 0;
    41. //0075のケース
    42. for (auto i = dic.begin(); i != dic.end(); ++i)
    43. {
    44. if (i->second + 1 >= 75)
    45. ans++;
    46. }
    47. for (auto i = dic.begin(); i != dic.end(); ++i)
    48. {
    49. for (auto j = dic.begin(); j != dic.end(); ++j)
    50. {
    51. if (i == j)
    52. continue;
    53. if (i->second + 1 >= 3 && j->second + 1 >= 25)
    54. ans++;
    55. if (i->second + 1 >= 5 && j->second + 1 >= 15)
    56. ans++;
    57. }
    58. }
    59. for (auto i = dic.begin(); i != dic.end(); ++i)
    60. {
    61. for (auto j = next(i); j != dic.end(); ++j)
    62. {
    63. for (auto k = next(j); k != dic.end(); ++k)
    64. {
    65. if (i->second + 1 >= 3 && j->second + 1 >= 5 && k->second + 1 >= 5)
    66. ans++;
    67. if (i->second + 1 >= 5 && j->second + 1 >= 3 && k->second + 1 >= 5)
    68. ans++;
    69. if (i->second + 1 >= 5 && j->second + 1 >= 5 && k->second + 1 >= 3)
    70. ans++;
    71. }
    72. }
    73. }
    74. cout << ans << endl;
    75. return 0;
    76. }
    77.