很典型的数位dp,把全球第一的代码拿过来研究了一下,加了点注释 代码作者:waakaaka 个人主页:https://leetcode.com/waakaaka/ ...
分类:
其他好文 时间:
2019-03-17 21:32:52
阅读次数:
174
C - Digital Roots Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single ...
分类:
其他好文 时间:
2019-03-17 19:39:55
阅读次数:
179
leetcode 953. Verifying an Alien Dictionary class Solution { public boolean isAlienSorted(String[] words, String order) { int[] o = new int[26]; for ( ...
分类:
其他好文 时间:
2019-03-17 18:32:13
阅读次数:
139
Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9. Each time, you ...
分类:
其他好文 时间:
2019-03-10 12:19:56
阅读次数:
150
题目描述 Now an emergent task for you is to open a password lock. The password is consisted of four digits. Each digit is numbered from 1 to 9.Each time, ...
分类:
其他好文 时间:
2019-03-07 17:37:58
阅读次数:
199
Calculate a+b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless there are less than f ...
分类:
其他好文 时间:
2019-03-06 19:20:27
阅读次数:
125
Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less tha ...
分类:
其他好文 时间:
2019-03-05 21:35:29
阅读次数:
174
1120 Friend Numbers (20 分) Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For ...
分类:
其他好文 时间:
2019-02-28 01:10:03
阅读次数:
156
一、问题描述 Given a 32-bit signed integer, reverse digits of an integer. 意思是给你一个32位有符号的整数,求这个整数的反转数字。 二、生词 signed adj /sa?nd/ 有符号的 overflow vi /??v?'fl??/ ...
分类:
其他好文 时间:
2019-02-28 00:56:33
阅读次数:
171
# readlines() read() with open('pi_digits.txt') as file_object: #函数open()接受一个参数:要打开的文件的名称。 contents = file_object.read() print(contents) print(content ...
分类:
其他好文 时间:
2019-02-28 00:51:00
阅读次数:
208