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: ...
分类:
其他好文 时间:
2016-06-15 15:51:38
阅读次数:
107
题目: Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit ...
分类:
其他好文 时间:
2016-06-14 08:51:28
阅读次数:
116
题目链接:https://leetcode.com/problems/add-digits/
题目:
Given a non-negative integer num, repeatedly add all its digits until the result has only
one digit.
For example:
Given num = 38, the p...
分类:
其他好文 时间:
2016-06-12 02:43:27
阅读次数:
135
Description A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2... ...
分类:
其他好文 时间:
2016-06-11 13:18:40
阅读次数:
144
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
4421: [Cerc2015] Digit Division Description 给出一个数字串,现将其分成一个或多个子串,要求分出来的每个子串能Mod M等于0. 将方案数(mod 10^9+7) 给出一个数字串,现将其分成一个或多个子串,要求分出来的每个子串能Mod M等于0. 将方案数( ...
分类:
其他好文 时间:
2016-06-07 14:39:19
阅读次数:
170
题意: 定义S(N) 为数字N每个位上数字的和。在给两个数a,b,求最小的正整数n,使得 a×S(n)=b×S(2n)。 官方题解: 构造题一般是找规律。找到了就恍然大悟了,找不到就……我靠这题怎么这么难! 做题要大胆,细心。 代码: ...
分类:
其他好文 时间:
2016-06-05 23:08:12
阅读次数:
296
题意:让求从2992-9999中所有数字,满足10进制各位之和和12进制和16进制各位数字之和相等。 析:没啥可说的,只能枚举从2992-9999,每个进制都算一下。 代码如下: ...
分类:
其他好文 时间:
2016-06-02 19:38:31
阅读次数:
161