kot_mapku3

2 E

Jun 2nd, 2020
694
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <string>
  4. #include <cmath>
  5.  
  6. using namespace std;
  7.  
  8. int eq(const string& s1, const string& s2){
  9.     for (int i = 0; i < s1.length(); ++i) {
  10.         if (s1[i] != s2[i]) return 1;
  11.     }
  12.  
  13.     return 0; // ok
  14. }
  15.  
  16. int main(){
  17.     ios::sync_with_stdio(false);
  18.     cin.tie(nullptr);
  19.  
  20.     long long n;
  21.     cin >> n;
  22.  
  23.     long long m = 1;
  24.     for (long long i = 2; i <= n; ++i) {
  25.         m = (m * i) % 1000000007;
  26.     }
  27.  
  28.     cout << m;
  29.  
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment