1.算法:查找数组中位数为偶数的个数问题1:如何计算位数通过while语句来对数字一直取整计数再通过对计算的数count对2取余来判断位数是否为偶数位最后将计算数count归零来用于下一个原数开始判断class solution{public int findNumbers(int []nums){ ...
分类:
数据库 时间:
2021-06-06 19:03:54
阅读次数:
0
//超出double精准度后,如何做加法和除法 BigDecimal sumlong = BigDecimal.ZERO; BigDecimal sumlat= BigDecimal.ZERO; for (int i = 0; i < split.length-1; i++) { String[] ...
分类:
其他好文 时间:
2021-06-06 19:01:37
阅读次数:
0
题目—01字符串 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 int main() 5 { 6 string a="0"; 7 int n; 8 cin>>n; 9 string ans=""; 10 if ...
分类:
其他好文 时间:
2021-06-06 19:01:00
阅读次数:
0
题目—吉祥物 (shiyancang.cn) 1 #include<bits/stdc++.h> 2 using namespace std; 3 int n,x; 4 int pos(int n) 5 { 6 int s=1,j=1; 7 while(s<n) 8 { 9 s+=j++; 10 } ...
分类:
其他好文 时间:
2021-06-06 18:58:39
阅读次数:
0
Preliminaries Linux Basics Change Password: passwd shutdown: sudo shutdown -h 3 (broadcast to all users in 3 mins) reboot: sudo reboot -r now create a ...
分类:
其他好文 时间:
2021-06-06 18:53:34
阅读次数:
0
随便新建一个文件夹,存放代码 新建一个java文件 文件后缀名为.java Hello.java 编写代码 public class Hello{ public static void main(String[] args){ System.out.print("hello world!"); } ...
分类:
其他好文 时间:
2021-06-06 18:52:26
阅读次数:
0
一.抽象类 在多态中父类方法体是多余的,永远不可能执行,所以出现了抽象方法,又因为类中含有抽象方法则该类必须为抽象类; 删除父类方法方法体-->抽象方法-->一个类含有抽象方法-->则该类必须为抽象类 Mammal抽象类 package com.lanou.util; //关键字 abstract可 ...
分类:
其他好文 时间:
2021-06-05 18:31:54
阅读次数:
0
SQL null 值 NULL函数 coalesce 接合,合并 SQL通用数据类型 DB数据类型 character varying 不同 integer DECIMAL(p,s) decimal numeric real stamp 邮票 印 interval 间隔 休息时间 mutiset 多 ...
分类:
其他好文 时间:
2021-06-05 18:23:54
阅读次数:
0
在Windows中,有时特定的ip只能访问特定的网络,就需要进行路由的转发。 1.查询路由信息 route print -4 是查询IPv4的路由信息,若要查询所有的,把`-4`去掉即可。 2.添加路由 route -p add 目的ip mask 子网掩码 下一跳ip 例如把目的为:10.100. ...
哥德巴赫猜想:大于8的偶数之和都可以被两个素数相加 范围 8 - 10000 思路: 首先不要去管需要什么什么东西实现,所以我们如果知道如何去完成: 大于8的偶数之和都可以被两个素数相加: # 可以假设 这个猜想是正确的。 # 设一个变量是true flag = True # 确定范围 8 - 10 ...
分类:
编程语言 时间:
2021-06-05 18:11:06
阅读次数:
0