Skip to content

Commit 6f2964e

Browse files
committed
Added 822A - I'm bored with life.cpp
1 parent 6e6b42c commit 6f2964e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

822A - I'm bored with life.cpp

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// ॐ नमः शिवाय
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
5+
#define ll long long
6+
#define pb push_back
7+
#define ff first
8+
#define ss second
9+
#define mp make_pair
10+
11+
// Code Written By: Vikash Patel
12+
// Codeforces Profile: https://codeforces.com/profile/vikashpatel
13+
14+
long long fact(long long n)
15+
{
16+
if(n==1)
17+
return 1;
18+
return n*fact(n-1);
19+
}
20+
21+
int main()
22+
{
23+
ios_base::sync_with_stdio(0);
24+
cin.tie(0);
25+
cout.tie(0);
26+
27+
// #ifndef ONLINE_JUDGE
28+
// freopen("input.txt", "r", stdin);
29+
// freopen("/Users/vikash/Desktop/output.txt", "w", stdout);
30+
// #endif
31+
32+
long long x,y;
33+
cin>>x>>y;
34+
if(x<y)
35+
{
36+
x=fact(x);
37+
cout<<x;
38+
}
39+
else
40+
{
41+
y=fact(y);
42+
cout<<y;
43+
}
44+
return 0;
45+
}

0 commit comments

Comments
 (0)