码迷,mamicode.com
首页 >  
搜索关键字:nearly prime numbers    ( 9679个结果
JavaScript Array map()、filter()以及map()与filter()区别
1、JavaScript Array map() 方法 【例子】 let numbers = [4, 9, 16, 25]; numbers.map(f); function f(item,index) { return item*100 } console.log(numbers) // [400 ...
分类:编程语言   时间:2020-06-18 12:54:44    阅读次数:72
欧拉筛
#include<bits/stdc++.h> using namespace std; int prime[5800000]; bool tag[100000000]; int tot = 0; int cnt=0; void Pr(int n) { memset(tag,0,sizeof tag ...
分类:其他好文   时间:2020-06-17 20:33:12    阅读次数:70
python实例化类,数据混乱、串内容问题(可变类型属性的初始化)
一般情况下,我们知道 在 python 中,strings, tuples, 和 numbers 是不可更改的对象,而 list,dict 等则是可以修改的对象 当把list和dict当参数传入函数时,强制为引用传值(即:在函数内部修改了对象,函数外部的对象也会改变) def update_rema ...
分类:编程语言   时间:2020-06-16 20:47:45    阅读次数:83
Linux 安装 Tomcat
解压缩并移动到指定目录 #解压缩 tar -zxvf apache-tomcat-8.5.23.tar.gz 1 #变更目录名 mv apache-tomcat-8.5.23 tomcat 1 #移动目录 mv tomcat/ /usr/local/ 1 #常用命令 #启动 /usr/local/t ...
分类:系统相关   时间:2020-06-16 13:17:44    阅读次数:57
有效电话号码-leetcode
有效电话号码 shell 编程题目 考察了很多方面的内容 shell 命令 grep | sed | awk 正则表达式 shell 的转义处理 1. 地址 https://leetcode-cn.com/problems/valid-phone-numbers/ 2. 解法 你可以假设一个有效的电 ...
分类:其他好文   时间:2020-06-16 00:34:28    阅读次数:121
Go语言系列之性能调优
在计算机性能调试领域里,profiling 是指对应用程序的画像,画像就是应用程序使用 CPU 和内存的情况。 Go语言是一个对性能特别看重的语言,因此语言中自带了 profiling 的库,这篇文章就要讲解怎么在 golang 中做 profiling。 Go性能优化 Go语言项目中的性能优化主要 ...
分类:编程语言   时间:2020-06-15 21:11:17    阅读次数:61
【剑指offer32 把数组排成最小的数】
题目描述 输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。 先将数组的元素排序(按字符序排) 然后从头到尾连接就可以 class Solution { public: st ...
分类:编程语言   时间:2020-06-15 11:48:55    阅读次数:56
质数筛选法:Eratosthenes筛选法与欧拉筛选法
第一种:开根号,这里不再重述 第二种:Eratosthenes筛选法 原理:利用倍数,讲非素数筛选掉 code: 1 int vis[maxn]; 2 void Prime() 3 { 4 vis[0] = 1; 5 vis[1] = 1; 6 for(int i = 2; i <= maxn; i ...
分类:其他好文   时间:2020-06-13 18:57:31    阅读次数:54
Leetcode: 902. Numbers At Most N Given Digit Set
descption We have a sorted set of digits D, a non-empty subset of {'1','2','3','4','5','6','7','8','9'}. (Note that '0' is not included.) Now, we writ ...
分类:其他好文   时间:2020-06-13 17:10:49    阅读次数:64
LeetCode 91 动态规划 Decode Ways 解码方法
LeetCode 91 动态规划 Decode Ways 解码方法LeetCodeA message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> ... ...
分类:其他好文   时间:2020-06-13 00:18:17    阅读次数:56
9679条   上一页 1 ... 20 21 22 23 24 ... 968 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!