LeetCode#225-Implement Stack using Queues-用队列实现栈 ...
分类:
其他好文 时间:
2020-03-22 19:32:09
阅读次数:
58
小明的快乐 Description 某天早上,小明突然发现自己家里多了两个售货机A和B,如果向A机器中放入a枚硬币,A机器会吐出来2a+1枚硬币。如果向B机器投入a枚硬币,B机器会吐出来2a+2枚硬币,现在小明想获得n枚硬币,请你输出使用机器的顺序。 注:开始时小明是没有硬币的。 Input 输入一 ...
分类:
其他好文 时间:
2020-03-22 17:34:29
阅读次数:
71
[toc] 前言 本篇文章是Map系列的第二篇( 第一篇可参考 "Java集合之Map" ),主要内容为:HashMap 底层实现原理是什么?HashMap的一些实现细节以及JDK8对HashMap做了哪些优化? 正文 HashMap是如何实现的? 在JDK1.8之前,HashMap是以数组加链表的 ...
分类:
编程语言 时间:
2020-03-21 20:50:56
阅读次数:
69
1 u = pow(1.001, 365) 2 d = pow(0.999, 365) 3 print("天天向上{:.2f},天天向下{:.2f}".format(u, d)) 千分之一 1 x = eval(input()) 2 du = pow(1 + x, 365) 3 dd = pow(1 ...
分类:
其他好文 时间:
2020-03-21 18:20:27
阅读次数:
55
#include <stdio.h> int main() { int a[20001];//储存每一位所得到的数 int temp,base,digit,power,i,j=0;//temp每次的得数 digit每次得数的位数 power是幂指数,base是底数 printf("type the ...
分类:
其他好文 时间:
2020-03-21 14:51:45
阅读次数:
41
原题链接在这里:https://leetcode.com/problems/implement-rand10-using-rand7/ 题目: Given a function rand7 which generates a uniform random integer in the range 1 ...
分类:
其他好文 时间:
2020-03-21 09:59:59
阅读次数:
57
I have seen that the most difference between an original BMW ICOM A2 and a clone is that the original has wifi capability, whereas the clone does not. ...
分类:
其他好文 时间:
2020-03-19 20:09:59
阅读次数:
113
编写一个函数实现n的k次方,使用递归实现。#include<stdio.h>intmy_pow(intm,intn){if(m>0){if(n>0){returnm*my_pow(m,n-1);}elsereturn1;}elseif(m<0){if(n%2==0){m=-m;returnmy_pow(m,n);}else{if(n>0){returnm*my_
分类:
编程语言 时间:
2020-03-19 09:24:23
阅读次数:
90
重装Mysql时遇到The service already exists! The current server installed:错误,在网上查询在dos命令行下执行sc query mysql 和 sc delete mysql即可,但我偏偏一直打开的是win10系统的Windows Powe ...
分类:
数据库 时间:
2020-03-17 08:02:23
阅读次数:
238
Design a stack which supports the following operations. Implement the CustomStack class: CustomStack(int maxSize) Initializes the object with maxSize ...
分类:
其他好文 时间:
2020-03-16 09:53:58
阅读次数:
54