摘要:
思路:注意一下,找猜中的时候什么都不用做,直接统计,找伪猜中也是先不管,然后再把结果减去猜中即可。public static int[] calcResult(String a, String b){ int[] res = new int[2]; Str... 阅读全文
摘要:
牛客网的在线题。思路,比较简单。就是判断一下是否有连起来的1. public static boolean checkWon(int[][] board){ boolean res = false; for(int i = 0; i < 3;i++){ ... 阅读全文
摘要:
思路,其实这题easy,就是看多少个5.答案: public static int getFactorSuffixZero(int n) { // write code here int res = 0; while(n != 0){ ... 阅读全文
摘要:
思路:借助max公式就可以了。max(x,y)=0.5*(x+y+|x-y|)注意:1,结尾要加(int)。答案:max(x,y)=0.5*(x+y+|x-y|)View Code 阅读全文
摘要:
思路:比较easy。就是借助hashset让他有序然后就能够比较节省时间了。答案: public static int[] getRankOfNumber(int[] a, int n){ int[] res = new int[n]; HashSet ha... 阅读全文