Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.math.BigDecimal;
- import java.math.BigInteger;
- import java.util.Scanner;
- public class Main{
- public static void main(String[] args) throws Exception{
- BigInteger n1,n2,n;
- int a,b;
- int resp;
- Scanner input = new Scanner(System.in);
- while(input.hasNext()){
- a = input.nextInt();
- b = input.nextInt();
- n1 = BigInteger.ONE;
- int c = a-b;
- for(int i=a; i>c; i--){
- n1 = n1.multiply(BigInteger.valueOf(i));
- }
- while(n1.mod(BigInteger.valueOf(2)).equals(BigInteger.ZERO)){
- n1 = n1.divide(BigInteger.valueOf(2));
- resp++;
- }
- System.out.println(n1);
- //BigInteger limit = n1.pow(BigDecimal.valueOf(0.5));
- //for(BigInteger i = BigInteger.valueOf(3); i.c ; i=i.add(val))
- System.out.println("fat:" + n1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement