原创 劍指Offer(從 1 到 N 中 1 出現的次數)java實現

劍指offer上有一題:從1到N中1出現的次數, 比如N 爲12時,出現1的數字有1,10,11,12,那麼1總共出現5次。 思路: 使用遞歸思想,先考慮普通輸入N = 345,從1 -- 345可以分拆爲1 -- 45和46 -- 34

原创 leetcode題解(1217) Play with Chips

    1217. Play with Chips        There are some chips, and the i-th chip is at position chips[i].       You can perform

原创 python中ThreadPoolExecutor線程池的模塊問題

如果python中導入線程池的模塊:from concurrent.futures import ThreadPoolExecutor,編譯器會報提示說找不到模塊。 其實python3標準庫裏包含concurrent模塊,ThreadPo

原创 python3,python2不同版本下安裝PyQt4

昨天在python3環境下安裝PyQt4,遇到了一些問題。經過一番搜索找到了問題的答案,感覺適合所有模塊更新和安裝的問題。 安裝流程如下: 1.Dos命令下,Python3.72環境,安裝提示PyQt4 is not a supporte

原创 劍指Offer(從 1 到 n 中 1 出現的次數)java實現

劍指offer上有一題: 從 1 到 n 中 1 出現的次數,本思路是劍指offer中的思路,用java代碼做的實現,思路請參考《劍指offer》 源代碼: public static int countDigitOne(in