제출 #1294261

#제출 시각아이디문제언어결과실행 시간메모리
1294261saleh_mursudlu캥거루 (CEOI16_kangaroo)C++20
0 / 100
1 ms568 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...