【Codeforces Round #422 (Div. 2) A】I'm bored with life
2017-10-04 18:44
429 查看
【题目链接】: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 ; 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; }
相关文章推荐
- Codeforces Round #422 (Div. 2) A I'm bored with life
- Codeforces Round #422 (Div. 2) A. I'm bored with life
- A. I'm bored with life
- I'm bored with life
- I'm bored with life
- Codeforces822 A I'm bored with life
- codeforces 822 A I'm bored with life
- A. I'm bored with life
- codeforces 822A(I'm bored with life) Java
- CodeForces - 822A I'm bored with life(阅读题)
- Codeforces Round #422 A. I'm bored with life
- 第一次看《随遇而安》First impression of <Be Peaceful With The Life>
- Codeforces Round #258 (Div. 2)1A Game With Sticks
- Codeforces Beta Round #27 (Codeforces format, Div. 2) E. Number With The Given Amount Of Divisors 反素数
- Codeforces Round #258 (Div. 2/A)/Codeforces451A_Game With Sticks
- div中图片居中超出后隐藏,center image in div with overflow hidden
- 【博弈论】【SG函数】Codeforces Round #188 (Div. 1) D. Game with Powers
- [道德篇MORALITY]Learn with whole Life 一生的学习
- Video Rendering with 8-Bit YUV Formats Gary Sullivan and Stephen Estrop Microsoft Digital Media Div
- past life with BlackBerry