【题目链接】:http://codeforces.com/contest/822/problem/A

【题意】



让你求a!和b!的gcd

min(a,b)<=12

【题解】



哪个小就输出那个数的阶乘



【Number Of WA】



0



【反思】

【完整代码】

#include <bits/stdc++.h>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define ms(x,y) memset(x,y,sizeof x)
#define Open() freopen("F:\\rush.txt","r",stdin)
#define Close() ios::sync_with_stdio(0) typedef pair<int,int> pii;
typedef pair<LL,LL> pll; const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
const double pi = acos(-1.0);
const int N = 12+5; LL fac[N]; int main(){
//Open();
Close();
fac[0] = 1;
rep1(i,1,12)
fac[i] = 1LL*fac[i-1]*i;
int a,b;
cin >> a >> b;
cout << fac[min(a,b)] << endl;
return 0;
}

最新文章

  1. Servlet转码问题
  2. PP常用bapi
  3. java-原生爬虫机制源码
  4. K3数据库表结构
  5. CLR via C#(17)--接口
  6. win10开始菜单打不开怎么办 win菜单键没反应解决办法
  7. SE 2014年4月18日
  8. Android Studio解决导入项目非常慢的问题
  9. Django使用forms来实现评论功能
  10. C++中const的实现机制深入分析
  11. JSP 标准标签库JSTL
  12. RoR - Advanced Querying
  13. 全面理解Javascript闭包和闭包的几种写法及用途【转】
  14. go语言之行--golang核武器goroutine调度原理、channel详解
  15. Android开发中Context类的作用以及Context的详细用法
  16. 【Android开发】构建Android源码编译环境
  17. linux常用命令:du 命令
  18. 给iOS开发新手送点福利,简述UISwitch的属性和用法
  19. 王者参考jar包
  20. [CF19E]Fairy

热门文章

  1. Jquery 设置class 和 div CSS
  2. django steps EASY WAY
  3. Converting Legacy Chrome IPC To Mojo
  4. 多任务-进程之PID
  5. oracle数据库回滚
  6. 系统级脚本 rpcbind
  7. Python学习————集合的增删查
  8. size(A,1)
  9. Linux shell 内部变量
  10. Swift编写的一些完整的app