链接: https://codeforces.com/contest/1263/problem/B 题意: A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013, ...
分类:
其他好文 时间:
2019-12-17 13:32:20
阅读次数:
168
7. Reverse Integer 题目描述: Given a 32 bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: 123 Output: ...
分类:
其他好文 时间:
2019-12-14 23:20:04
阅读次数:
163
7. Reverse Integer 题目描述: Given a 32 bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: 123 Output: ...
分类:
编程语言 时间:
2019-12-14 22:56:31
阅读次数:
111
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic ...
分类:
其他好文 时间:
2019-12-12 13:14:24
阅读次数:
93
LeetCode 第 166 场周赛 "1281.subtract the product and sum of digits of an integer" "1282.group the people given the group size they belong to" "1283.find ...
分类:
其他好文 时间:
2019-12-10 13:14:12
阅读次数:
141
0. 使用递归编写一个十进制转换为二进制的函数(要求采用“取2取余”的方式,结果与调用bin()一样返回字符串形式)。 me: 参考答案: 1. 写一个函数get_digits(n),将参数n分解出每个位的数字并按顺序存放到列表中。举例:get_digits(12345) ==> [1, 2, 3, ...
分类:
其他好文 时间:
2019-12-08 23:46:29
阅读次数:
406
链接: https://vjudge.net/problem/HDU 4734 题意: For a decimal number x with n digits (A nA n 1A n 2 ... A 2A 1), we define its weight as F(x) = A n 2 n 1 ...
分类:
其他好文 时间:
2019-12-07 01:15:42
阅读次数:
120
258. Add Digits class Solution { public int addDigits(int num) { if(num == 0) return 0; if(num % 9 == 0){ return 9; }else{ return num % 9; } } } 43. M ...
分类:
其他好文 时间:
2019-12-02 17:22:21
阅读次数:
92
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 ...
分类:
其他好文 时间:
2019-11-29 14:24:00
阅读次数:
88
在项目local.properties里做出如下定义: keygen.order.code.digits=8 keygen.order.code.start=00000000 keygen.order.code.numeric=true keygen.order.code.template=$ co ...
分类:
其他好文 时间:
2019-11-28 22:48:00
阅读次数:
94