题目链接:https://leetcode.com/problems/number-of-digit-one/?tab=Description 题意:求[1,n]内1的个数。 裸数位DP,好久不写都快不会写了。。这么水 1classSolution {2public:3intdp[30][30];4intdigit[30];56intdfs(intl,intcnt,boolflag) {7if(l ==0)returncnt;8if(!flag && ~dp[l][cnt...
题目链接:https://leetcode.com/problems/nth-digit/#/description 题意:找1234567891011...这样的字符串中第n位是数字几。 规律就是k位数有9*10^k个数字,找到第n位数所在的数字区段,记作k位数的段,然后在这个段里找到对应的那个k位数,然后数出来对应的位就行了。 1classSolution {2public:3intfindNthDigit...
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
LeetCode NthDigit 原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nthdigitof the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7
原题链接在这里:https://leetcode.com/problems/nth-digit/#/description 题目: Find the nth digit of the infinite integer sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1 LeetCode git java 干货 转载 mob604756e80bb7 2017-04-01 01:59:00 158阅读 2评论 find...