Advertisement
ivnikkk

Untitled

Dec 11th, 2021
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.43 KB | None | 0 0
  1. #include <vector>
  2. #include<iostream>
  3. #include <algorithm>
  4. #include <cmath>
  5. #include <iomanip>
  6. #include <fstream>
  7. #include <string>
  8. #include <set>
  9. #include <deque>
  10. #include <queue>
  11. #include <map>
  12. #include <bitset>
  13. #include <random>
  14. #include <cassert>
  15. #include <unordered_map>
  16. #include <unordered_set>
  17. using namespace std;
  18. typedef long long             ll;
  19. typedef unsigned long long     ull;
  20. typedef long double            ld;
  21. #define endl              "\n"
  22. #define all(a)            a.begin(), a.end()
  23. #define allr(a)           a.rbegin(), a.rend()
  24. #define pb                push_back
  25. #define F                 first
  26. #define S                 second
  27. int mod = 10000;
  28. template<typename T>
  29. T mul(T x) {
  30.     return x;
  31. }
  32.  
  33. template<typename T, typename... Ts>
  34. T mul(T x, Ts... y) {
  35.     return (x * 1ll * mul(y...)) % mod;
  36. }
  37.  
  38. template<typename T, typename... Ts>
  39. void uul(T& x, Ts... y) {
  40.     x = mul(x, y...);
  41. }
  42.  
  43. int bin(int a, ll deg) {
  44.     int r = 1;
  45.     while (deg) {
  46.         if (deg & 1)
  47.             uul(r, a);
  48.         deg >>= 1;
  49.         uul(a, a);
  50.     }
  51.     return r;
  52. }
  53. void solve() {
  54.     int ans = 0;
  55.     for (int i = 1; i <= 14; i++) {
  56.         ans += bin(5, 25 * i);
  57.     }
  58.     cout << ans << endl;
  59. }
  60. signed main() {
  61.     ios_base::sync_with_stdio(false);
  62.     cin.tie(nullptr);
  63.     ll t = 1;
  64.     //cin >> t;
  65.     while (t--) {
  66.         solve();
  67.         //cout << "Case #" << buffer << ' ';
  68.  
  69.     }
  70. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement