Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <string>
- #include <cmath>
- using namespace std;
- int eq(const string& s1, const string& s2){
- for (int i = 0; i < s1.length(); ++i) {
- if (s1[i] != s2[i]) return 1;
- }
- return 0; // ok
- }
- int main(){
- ios::sync_with_stdio(false);
- cin.tie(nullptr);
- long long n;
- cin >> n;
- long long m = 1;
- for (long long i = 2; i <= n; ++i) {
- m = (m * i) % 1000000007;
- }
- cout << m;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment