首页 > 代码库 > Codeforces Round #422 A
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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。