题目描述: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 解题思路: 这道题比较简单,只要注意两个问题:1,输入可能有123,-123两种情况。2,可能会出现值溢出 ...
分类:
其他好文 时间:
2016-06-08 01:32:51
阅读次数:
142
Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specificat ...
分类:
其他好文 时间:
2016-06-07 20:49:18
阅读次数:
139
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:
其他好文 时间:
2016-06-07 16:06:38
阅读次数:
159
题目描述: 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 s ...
分类:
其他好文 时间:
2016-06-05 15:25:40
阅读次数:
101
Add Digits
Total Accepted: 98713 Total
Submissions: 202414 Difficulty: Easy
Given a non-negative integer num, repeatedly
add all its digits until the result has only one di...
分类:
其他好文 时间:
2016-06-03 19:36:37
阅读次数:
120
题目大意:给n个0~15之间的数,有3种更新操作,1种询问操作。3种更新操作是:1、让某个闭区间的所有数字与一个0~15之间的数字进行逻辑与运算;2、让某个闭区间的所有数字与一个0~15之间的数字进行逻辑或运算;3、让某个闭区间的所有数字与一个0~15之间的数字进行异或运算。一种询问操作是询问某个闭 ...
分类:
其他好文 时间:
2016-06-02 13:03:24
阅读次数:
197
字符串方法 string.digits:包含数字0-9的字符串 string.letters:包含所有字母(大写或小写)的字符串 string.lowercase:包含所有小写字母的字符串 string.printable: 包含所有可打印字符的字符串 string.punctuation:包含所有 ...
分类:
编程语言 时间:
2016-05-30 23:16:49
阅读次数:
178
1082 - Array Queries PDF (English) Statistics ForumTime Limit: 3 second(s) Memory Limit: 64 MBGiven an array with N elements, indexed from 1 to N. Now ...
分类:
其他好文 时间:
2016-05-29 21:16:57
阅读次数:
159
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 ...
分类:
其他好文 时间:
2016-05-24 22:43:30
阅读次数:
158
Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here a ...
分类:
其他好文 时间:
2016-05-24 22:21:01
阅读次数:
173