| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1294262 | saleh_mursudlu | Kangaroo (CEOI16_kangaroo) | C++20 | 1 ms | 568 KiB |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n,m,a,b,c,d,x;
cin>>a>>b>>c;
if(a-b==b){
if(b<c){
long long k=1;
long long i=1;
long long h=a-b;
while(h!=1){
if(i%2==1){
k*=b;
}
else{
k*=h;
}
b--;
h--;
i++;
}
cout<<k<<endl;
}
else{
long long k=1;
long long i=1;
long long h=a-b;
while(b!=1){
if(i%2==1){
k*=b;
}
else{
k*=h;
}
b--;
h--;
i++;
}
cout<<k<<endl;
}
}
else{
if(a-b>b){
long long k=1;
long long i=1;
long long h=a-b;
while(h!=1){
if(i%2==1){
k*=b;
}
else{
k*=h;
}
b--;
h--;
i++;
}
cout<<k<<endl;
}
else{
long long k=1;
long long i=1;
long long h=a-b;
while(b!=1){
if(i%2==1){
k*=b;
}
else{
k*=h;
}
b--;
h--;
i++;
}
cout<<k<<endl;
}
}}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
