Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
439 B
6
Indexable
Never
import java.util.Scanner;
public class Main{
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int k = input.nextInt();
        long p=1;
        long p1=1;
        for(int i=k-1;i>=0;i--){
            p*=(n-i);
        }
        for(int i=1;i<=k;i++){
            p1*=i;
        }
        System.out.println(p/p1);
    }
}
//by Alarm Tran