https://leetcode.com/problems/rotated-digits/html
X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotated - we cannot choose to leave it alone. A number is valid if each digit remains a digit after rotation. 0, 1, and 8 rotate to themselves; 2 and 5 rotate to each other; 6 and 9 rotate to each other, and the rest of the numbers do not rotate to any other number and become invalid. Now given a positive number N, how many numbers X from 1 to N are good? Example: Input: 10 Output: 4 Explanation: There are four good numbers in the range [1, 10] : 2, 5, 6, 9. Note that 1 and 10 are not good numbers, since they remain unchanged after rotating.
Note:git
數字0/1/8,180度翻轉以後仍是自己,數字3/4/7,180度翻轉以後造成不了數字,數字2和數字5翻轉以後是對方,數字6和數字9翻轉以後也是對方。程序員
好比數字17,反轉以後不是數字,那麼不是好數。好比數字18,翻轉以後仍是數字18,也不是好數。好比數字19,翻轉以後是16,是好數。算法
class Solution(object): def rotatedDigits(self, N): counts = 0 for num in range(1, N+1): number = str(num) if '3' in number or '7' in number or '4' in number: # This will be an invalid number upon rotation continue # Skip this number and go to next iteration if '2' in number or '5' in number or '6' in number or '9' in number: counts += 1 return counts
Struts2漏洞原理apache
學習Apache Struts中利用OGNL注入原理安全
前言 內容 入門 - 安裝Tomcat - 安裝Struts舊版本 Web服務器基礎知識 - Java_servlet概念 - Apache Struts基礎知識 - struts_2教程 - (模型 - 視圖 - 控制器)架構模式 Struts應用程序示例 - 服務器端模板和注入 表達語言注入 對象圖導航語言注入 - 調試Java應用程序 CVE-2017-5638原理 CVE-2018-11776原理 理解OGNL注入Payload - CVE-2017-5638和CVE-2018-11776的Payload: 總結 參考
在Apache Struts中利用OGNL注入服務器
http://www.javashuo.com/article/p-dbbgzuoa-bn.html數據結構
搜索特定的關鍵字找URL、標題架構
搜索引擎提取信息學習
百度搜索
獲取搜索結果的真實URL、描述、標題
http://www.javashuo.com/article/p-oktknynm-ka.html
理論學科的基礎
理論學科知識學習
程序員練級攻略:理論學科
極客時間-左耳聽風-程序員攻略-理論學科
http://www.javashuo.com/article/p-rttnqlhn-hx.html