@digits()

加载中

8504. Sum of Digits

https://my.oschina.net/u/4408081/blog/3748384

Sum of Digits   Having watched the last Harry Potter film, little Gerald also decided to practice magic. He found in his father's magical book a spell that turns any number in...

2018/11/17 00:00

【Leetcode】258.Add Digits

https://my.oschina.net/u/1440880/blog/2247169

` /** 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: 3 + 8 = 11, 1 + ...

Add Digits(leetcode258)

https://my.oschina.net/u/2277632/blog/2986831

Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. Example: Input: 38 Output: 2 Explanation: The process is like: 3 + 8 = 11, 1...

2018/12/11 00:00

leetcode- Add Digits

https://my.oschina.net/u/1391394/blog/726208

Given a non-negative integer , repeatedly add all its digits until the result has only one digit. For example: Given , the process is like: , . Since has only one digit, return ...

2016/08/03 00:00

CF1209C Paint the Digits

https://my.oschina.net/u/4325833/blog/3396142

You are given a sequence of n digits d1d2…dn. You need to paint all the digits in two colors so that: each digit is painted either in the color 1 or in the color 2; if you wri...

2019/09/15 00:00

[kata] Playing with digits

https://my.oschina.net/u/4305185/blog/3848756

package kata_011; /** Some numbers have funny properties. For example: * 89 --> 8¹ + 9² = 89 * 1 * 695 --> 6² + 9³ + 5⁴= 1390 = 695 * 2 * 46288 --> 4³ + 6⁴+ 2⁵ + 8⁶ + ...

2018/08/28 00:00

DIGITS的安装与使用记录

https://my.oschina.net/u/2280056/blog/662383

DIGITS是我一直想尝试的软件,觉得对我这种想加速学习深度学习的人来说很有用,DIGITS的安装有两种方法,一种是源码安装,一种是可在软件仓库中安装,显然,对于ubuntu,用后者安装更方便,安...

2016/04/19 00:00

CF997B Roman Digits

https://my.oschina.net/u/4329639/blog/3891199

题意翻译 给你一棵树,每次挑选这棵树的两个叶子,加上他们之间的边数(距离),然后将其中一个点去掉,问你边数(距离)之和最大可以是多少. 题目描述 You are given an unweighted tree with n n ...

2018/07/26 00:00

CF997B Roman Digits

https://my.oschina.net/u/4344016/blog/3833339

思路: 不是很好想的数学题。 参考了https://blog.csdn.net/litble/article/details/80924306 实现: 1 #include 2 using namespace std; 3 int main() 4 { 5 int n; 6 while (cin >> n) 7 {...

2018/09/09 00:00

Ural 1014-The Product of Digits

https://my.oschina.net/u/2725918/blog/666699

【问题描述】 Your task is to find the minimal positive integer number Q so that the product of digits of Q is exactly equal to N. Input The input contains the single integer num...

2016/04/26 00:00

Program to reverse the digits of a number

https://my.oschina.net/u/113421/blog/105520

C int main(void) {int number, right_digit;printf("Enter your number.n");scanf("%i", &number);while (number != 0) {right_digit = number % 10;printf("%i", right_digit);number = nu...

2013/01/28 00:00

leetcode 788. Rotated Digits

https://my.oschina.net/u/4340253/blog/4043637

X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. Each digit must be rotated - we cannot choose to lea...

2018/03/17 00:00

cf 1409D. Decrease the Sum of Digits

https://my.oschina.net/u/4377703/blog/4658585

cf 1409D. Decrease the Sum of Digits 题意 给你一个两个数m和n m可以不断地加一直到m所有位上的数字之和小于或等于n,最少可以加多少可以达到要求。 思路 如果最开始m所有位上数字之和小于...

2020/10/03 00:00

leetcode 788. Rotated Digits

https://my.oschina.net/u/4352770/blog/4242295

X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. A number is valid if each digit remains a digit afte...

2018/02/25 00:00

[leetcode-788-Rotated Digits]

https://my.oschina.net/u/4418133/blog/4243647

X is a good number if after rotating each digit individually by 180 degrees, we get a valid number that is different from X. A number is valid if each digit remains a digit afte...

2018/02/26 00:00

[NBOJ0032][Non-Decreasing Digits]

https://my.oschina.net/u/554893/blog/83001

[题目要求] http://acm.bupt.edu.cn/onlinejudge/newoj/showProblem/showproblem.php?problem_id=32 [题目涉及的相关理论与算法] 递归思想 [题目中需要注意的地方] 有两个,一个是上限问题,...

2012/10/14 00:00

Reverses the digits of an integer mathmatically

https://my.oschina.net/u/562583/blog/127316

//Demonstrates the use of a do loopimport java.util.Scanner;public class ReverseNumber {public static void main(String []args){int number,lastDigit,reverse=0;Scanner scan=new Sc...

2013/05/03 00:00

402. Remove K Digits

https://my.oschina.net/u/4087523/blog/4866659

思路 从前往后遍历数字,如果某一位的数字比下一位大,说明只要删除这一位,让下一位数字来代替这一位,就可以让整个数字变小。 所以维护一个非递减栈,从前向后遍历每一位,循环把比当前位大...

2018/09/19 00:00
返回顶部
顶部