![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
shuxue
sakurahzy
这个作者很懒,什么都没留下…
展开
-
数学之中位数、众数\平方数
中位数问题: class Solution { public int minMoves2(int[] nums) { // /*第一种解法:以每一个元素为目标对象,求出其他的元素距离目标对象的差之和,满足差值和最小的就是移动的最小数 // 时间复杂度o(n^2)**/ // int min=Integer.MAX_VALUE; // ...原创 2019-01-21 10:36:31 · 198 阅读 · 0 评论 -
数学
1.3的幂 class Solution { public boolean isPowerOfThree(int n) { if(n<1) return false; if(n==1) return true; int base=3; while(n>1){ if(n%base!=0){ ...原创 2019-01-22 11:12:47 · 84 阅读 · 0 评论 -
数学
链接:https://ac.nowcoder.com/acm/contest/330/J 来源:牛客网 仅一行三个整数 f1,f2,af1,f2,a,分别表示两只手产生的力的大小以及它们之间的夹角。 import java.util.Scanner; public class Main{ public static void main(String[] args){ ...原创 2019-01-30 12:33:30 · 90 阅读 · 0 评论