Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long double fat(int n){
- long double f = 1;
- for(int i=2; i<=n; i++)
- f *= i;
- return f;
- }
- int main(){
- int n, q;
- long double t;
- while(cin>>n>>q && n+q){
- cin>>t;
- long double ans = fat(n-q+1);
- if(ans <= t) cout<<ans<<"\n";
- else printf("descartado\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement