编程题
快到碗里来
import java.math.BigDecimal;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
BigDecimal n = sc.nextBigDecimal();
BigDecimal r = sc.nextBigDecimal();
BigDecimal len = new BigDecimal("6.28").multiply(r);
System.out.println(n.compareTo(len) == 1 ? "No" : "Yes");
}
}
}
跳台阶问题
public class Solution {
public int jumpFloorII(int target) {
//整数x*2^n = x<<n;
//2^(target-1)=1*2^(target-1)
return 1<<--target;
}
}