Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:
其他好文 时间:
2017-05-28 13:59:27
阅读次数:
184
题目描述 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a si ...
分类:
其他好文 时间:
2017-05-26 20:42:56
阅读次数:
207
Time Limit:3000MS Memory Limit:65536KB Description You are given a sequence a[0]a[1] ... a[N-1] of digits and a prime number Q. For each i<=j with a[i ...
分类:
其他好文 时间:
2017-05-25 10:13:01
阅读次数:
151
Problem :It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order.Find the smallest p ...
分类:
编程语言 时间:
2017-05-24 21:02:13
阅读次数:
249
题目如下: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Note:The input is assumed to be a 32-bit signed integ ...
分类:
其他好文 时间:
2017-05-22 16:50:15
阅读次数:
109
/*注意注意:本题非hdu4333原题,而是简化版,原版有多组数据。但此代码在修改输入后依旧可以通过多组数据*/ 给出一个数字串,问有多少本质不同同构串比原串小,一样,大.同构串是指,对于原串S[1-N]通过旋转变成同构串S[i-N]+S[0-i-1].本质不同,指的是字符串不一样. /*注意注意: ...
分类:
其他好文 时间:
2017-05-22 16:45:24
阅读次数:
232
Digital Roots Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a si ...
分类:
其他好文 时间:
2017-05-22 10:26:35
阅读次数:
253
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2017-05-21 13:45:23
阅读次数:
127
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contai ...
分类:
其他好文 时间:
2017-05-19 12:15:11
阅读次数:
306
题目:Reverse Integer Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have you thought about this? Here are so ...
分类:
其他好文 时间:
2017-05-18 23:56:51
阅读次数:
312