码迷,mamicode.com
首页 >  
搜索关键字:numbers range    ( 16974个结果
Java并发之CountDownLatch、Semaphore和CyclicBarrier
已剪辑自: https://www.jianshu.com/p/bb5105303d85 JAVA并发包中有三个类用于同步一批线程的行为,分别是CountDownLatch、Semaphore和CyclicBarrier。 CountDownLatch CountDownLatch是一个计数器闭锁, ...
分类:编程语言   时间:2020-06-24 11:54:33    阅读次数:54
python-写函数,获取传入列表的所有奇数位索引对应的元素,并将其作为新列表返回。
def lst(list): #定义一个函数,创建一个列表 lst1 = [] #在函数中定义一个空列表 for i in range(len(list)): if i %2 ==1: #i为奇数 lst1.append(list[i]) #list[i]添加到lst1列表中 return lst1 ...
分类:编程语言   时间:2020-06-24 00:33:44    阅读次数:160
1095 Cars on Campus (30分)(排序)
1095 Cars on Campus (30分) Zhejiang University has 8 campuses and a lot of gates. From each gate we can collect the in/out times and the plate numbers ...
分类:编程语言   时间:2020-06-24 00:20:12    阅读次数:73
构建乘积数组(python)
一,问题 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1]。不能使用除法。(注意:规定B[0] = A[1] * A[2] * ... * A[n-1],B[n- ...
分类:编程语言   时间:2020-06-24 00:11:32    阅读次数:70
A1069 The Black Hole of Numbers (20分)
一、技术总结 这一题主要学习到两个知识点,一个是stoi函数的使用,之前已经讲过了,可以将一个字符串转化为10进制的数字; 还有就是字符串string中insert函数的使用,可以str.insert(0, num, '0');意思是在下标为0处插入num个字符‘0’; 还有就是使用dowhile; ...
分类:其他好文   时间:2020-06-23 21:22:54    阅读次数:42
Codeforce 318A - Even Odds(数学水题)
Being a nonconformist, Volodya is displeased with the current state of things, particularly with the order of natural numbers (natural number is posit ...
分类:其他好文   时间:2020-06-23 21:22:33    阅读次数:63
Tinyrender-Lesson 2 Triangle rasterization and back face culling
Tinyrender-Lesson 2 Triangle rasterization and back face culling 原文:https://github.com/ssloy/tinyrenderer/wiki/Lesson-2-Triangle-rasterization-and-bac ...
分类:其他好文   时间:2020-06-23 21:05:47    阅读次数:62
msf stagers开发不完全指北(一)
采用c开发stagers 前言 之前有写过一篇 [metasploit payload运行原理浅析(sockedi调用约定是什么)],里面有提到以后了解这些东西后可以做的事情,其实包括但不限于自写stagers,扩展C2 实现。本系列将从之前这篇文章中获取到的原理性知识进行实践,一步步记录我在这个过 ...
分类:其他好文   时间:2020-06-23 19:28:46    阅读次数:64
leetcode-面试题 16.18. 模式匹配
方法一: class Solution: def patternMatching(self, pattern: str, value: str) -> bool: count_a = sum(1 for ch in pattern if ch == 'a') count_b = len(patter ...
分类:其他好文   时间:2020-06-23 01:19:14    阅读次数:92
python编程迭代与循环
测码学院 1、打开IDLE python GUI,点击开始-所有程序-python2.7-IDLE python GUI,或者直接进入dos环境,或者其他的IDLE。 2、如果想循环1至10,代码为for n in range(1,11,1):或者for n in range(1,11):,在ran ...
分类:编程语言   时间:2020-06-22 23:28:09    阅读次数:96
16974条   上一页 1 ... 61 62 63 64 65 ... 1698 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!