#num

用numpy里的savetxt()

将变量存储到txt,以便观察。...
代码星球 ·2020-08-15

numpy.hstack(tup)

numpy.hstack(tup)Stackarraysinsequencehorizontally(columnwise).Takeasequenceofarraysandstackthemhorizontallytomakeasinglearray.Rebuildarraysdividedby hspli...
代码星球 ·2020-08-15

numpy.random.uniform(记住文档网址)

http://docs.scipy.org/doc/numpy/reference/generated/numpy.random.uniform.html#numpy.random.uniform   http://docs.scipy.org/doc/ http://docs....

1038 Recover the Smallest Number (30分)(贪心)

Givenacollectionofnumbersegments,youaresupposedtorecoverthesmallestnumberfromthem.Forexample,given{32,321,3214,0229,87},wecanrecovermanynumberssuchlike32-321-32...

1024 Palindromic Number (25 分)

Anumberthatwillbethesamewhenitiswrittenforwardsorbackwardsisknownasa PalindromicNumber.Forexample,1234321isapalindromicnumber.Allsingledigitnumbersarepalin...
代码星球 ·2020-08-09

1023 Have Fun with Numbers (20 分)

1023 HaveFunwithNumbers (20 分) Noticethatthenumber123456789isa9-digitnumberconsistingexactlythenumbersfrom1to9,withnoduplication.Doubleitwew...
代码星球 ·2020-08-09

1019 General Palindromic Number (20 分)

Anumberthatwillbethesamewhenitiswrittenforwardsorbackwardsisknownasa PalindromicNumber.Forexample,1234321isapalindromicnumber.Allsingledigitnumbersarepalin...

HDU 1711 Number Sequence KMP

题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=1711AC代码: #include<iostream>#include<cstdio>#include<cstdlib>#include<cmath>#i...

leetcode 17-> Letter Combinations of a Phone Number

 classSolution(object):defletterCombinations(self,digits):""":typedigits:str:rtype:List[str]"""ifdigits=="":return[]nums_to_letters={2:"abc",3:"def",4:"ghi...

在Xshell 6开NumLock时按小键盘上的数字键并不能输入数字

小键盘问题在Xshell6上用vi的时候,开NumLock时按小键盘上的数字键并不能输入数字,而是出现一个字母然后换行(实际上是命令模式上对应上下左右的键)。解决方法选项Terminal->Features里,找到Disableapplicationkeypadmode,选上就可以了在xmanager4中的xsh...

leetcode 9 -> Palindrome Number

 classSolution(object):defisPalindrome(self,x):""":typex:int:rtype:bool"""s=str(x)if(s==s[::-1]):returnTrueelse:returnFalse ...
代码星球 ·2020-08-09

leetcode 2-> Add Two Numbers

 classSolution(object):defaddTwoNumbers(self,l1,l2):l3=ListNode(0)current=l3carry=0whilel1orl2:#1,1|None,1|1,None#Pad0ifNoneifl1isNone:l1v=0else:l1v=l1.val...
代码星球 ·2020-08-09

Add Two Numbers ,使用链表参数

 #Definitionforsingly-linkedlist.classListNode(object):def__init__(self,x):self.val=xself.next=NoneclassSolution(object):defaddTwoNumbers(self,l1,l2):l3=Li...

ERROR: child process failed, exited with error number 100

 [root@localhost~]#mongod--dbpath=/usr/local/mongodb/data--logpath=/usr/local/mongodb/logs--logappend--port=27017--forkabouttoforkchildprocess,waitinguntil...
首页上一页...352353354355356...下一页尾页