Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. import java.math.BigDecimal;
  2. import java.math.BigInteger;
  3. import java.util.Scanner;
  4.  
  5. public class Main{
  6.  
  7. public static void main(String[] args) throws Exception{
  8. BigInteger n1,n2,n;
  9. int a,b;
  10. int resp;
  11. Scanner input = new Scanner(System.in);
  12. while(input.hasNext()){
  13. a = input.nextInt();
  14. b = input.nextInt();
  15. n1 = BigInteger.ONE;
  16. int c = a-b;
  17. for(int i=a; i>c; i--){
  18. n1 = n1.multiply(BigInteger.valueOf(i));
  19. }
  20. while(n1.mod(BigInteger.valueOf(2)).equals(BigInteger.ZERO)){
  21. n1 = n1.divide(BigInteger.valueOf(2));
  22. resp++;
  23. }
  24. System.out.println(n1);
  25. //BigInteger limit = n1.pow(BigDecimal.valueOf(0.5));
  26. //for(BigInteger i = BigInteger.valueOf(3); i.c ; i=i.add(val))
  27.  
  28.  
  29.  
  30.  
  31.  
  32. System.out.println("fat:" + n1);
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement