BigDecimal加减乘除 原文连接:https://blog.csdn.net/csdn565973850/article/details/73822102 BigDecimal bignum1 = new BigDecimal("10"); BigDecimal bignum2 = new B ...
分类:
其他好文 时间:
2020-07-06 16:19:46
阅读次数:
49
题意:有一个数$n$,每次操作可以使$n*=2$或$n/=6$(如果能被整除),求最少操作次数使得$n=1$,如果不满足,输出$-1$. 题解:我们只要看$n$的质因子即可,如果要满足条件,那么它的质因子只能含有$2$和$3$,并且$2$的次数不大于$3$的次数.直接去找$2$和$3$的次数即可.( ...
分类:
其他好文 时间:
2020-06-29 13:41:34
阅读次数:
79
归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。将已有序的子序列合并,得到完全有序的序列;即先使每个子序列有序,再使子序列段间有序。若将两个有序表合并成一个有序表,称为2-路归并。 ...
分类:
编程语言 时间:
2020-06-28 00:09:58
阅读次数:
71
Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividi ...
分类:
其他好文 时间:
2020-06-21 19:56:30
阅读次数:
47
一、归并排序 归并排序是建立在归并操作上的一种有效的排序算法。该算法是采用分治法(Divide and Conquer)的一个非常典型的应用。将已有序的子序列合并,得到完全有序的序列;即先使每个子序列有序,再使子序列段间有序。若将两个有序表合并成一个有序表,称为2-路归并。 所谓“分”,指的是将一个 ...
分类:
编程语言 时间:
2020-06-17 01:03:57
阅读次数:
82
此枚举指示空间结构元素或代理的组成。IFC2x中增加的新枚举 ConstantDescription COMPLEX A group or aggregation of similar elements. ELEMENT An (undivided) element itself. PARTIAL ...
分类:
编程语言 时间:
2020-06-15 10:28:07
阅读次数:
63
# java在浮点型运算时是非精确计算,如下 System.out.println(0.05 + 0.01);// 0.060000000000000005 System.out.println(1.0 - 0.42);// 0.5800000000000001 System.out.println ...
分类:
其他好文 时间:
2020-06-05 13:25:34
阅读次数:
62
Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th ...
分类:
其他好文 时间:
2020-06-04 11:56:26
阅读次数:
48
module divide_2(clk,rst,clk_out); input clk,rst;output clk_out; reg clk_out; always @(posedge clk or negedge rst) if(!rst) begin clk_out<=0; end else ...
分类:
其他好文 时间:
2020-06-03 15:31:59
阅读次数:
79
使用了long。没有解决int的溢出问题。 class Solution { public: int divide(int dividend, int divisor) { //if (dividend == 0) return 0; //if (divisor == 1) return divid ...
分类:
其他好文 时间:
2020-05-31 18:17:56
阅读次数:
101