Codeforces Round #422 A

Posted %%%%%

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Codeforces Round #422 A相关的知识,希望对你有一定的参考价值。

I‘m bored with life

题意:给一个a,b,求 gcd(a!,b!),输出min(a,b)! 就可以了

AC代码:

#include<bits/stdc++.h>
#include "iostream"
#include "string.h"
#include "stack"
#include "queue"
#include "string"
#include "vector"
#include "set"
#include "map"
#include "algorithm"
#include "stdio.h"
#include "math.h"
#define ll long long
#define bug(x) cout<<x<<" "<<"UUUUU"<<endl;
#define mem(a) memset(a,0,sizeof(a))
#define mp(x,y) make_pair(x,y)
#define pb push_back
const long long INF = 1e18+1LL;
const int inf = 1e9+1e8;
using namespace std;
const int N=1e5+100;

ll a,b,ans=1;
int main(){
    cin>>a>>b;
    for(int i=2; i<=min(a,b); ++i){
        ans*=i;
    }
    cout<<ans<<endl;
    return 0;
}

 

以上是关于Codeforces Round #422 A的主要内容,如果未能解决你的问题,请参考以下文章

Codeforces Round #422 (Div. 2) A-C

codeforces round 422 div2 补题 CF 822 A-F

Codeforces Round #422 B

Codeforces Round #422 C

Codeforces Round #422 (Div. 2) C Hacker, pack your bags!

Codeforces Round #422 (Div. 2) E. Liar 后缀数组+RMQ+DP