码迷,mamicode.com
首页 >  
搜索关键字:digits    ( 2164个结果
CF915C Permute Digits
思路: 从左到右贪心放置数字,要注意判断这个数字能否放置在当前位。 实现: ...
分类:其他好文   时间:2018-01-30 12:17:52    阅读次数:184
Leetcode 670: Maximum Swap
Given a non-negative integer, you could swap two digits at most once to get the maximum valued number. Return the maximum valued number you could get. ...
分类:其他好文   时间:2018-01-28 11:15:36    阅读次数:114
PAT 1060. Are They Equal
If a machine can save only 3 significant digits, the float numbers 12300 and 12358.9 are considered equal since they are both saved as 0.123 105 with ...
分类:其他好文   时间:2018-01-27 13:35:56    阅读次数:146
Permute Digits
You are given two positive integer numbers a and b. Permute (change order) of the digits of a to construct maximal number not exceeding b. No number i ...
分类:其他好文   时间:2018-01-27 00:30:48    阅读次数:183
Python-sys模块,异常
习题1:题目:给一个不多于5位的正整数,要求:一、求它是几位数,二、逆序打印出各位数字。 #encoding=utf-8 while True: try: num=int(raw_input("input a number not more than 5 digits:")) except: "Pl... ...
分类:编程语言   时间:2018-01-25 00:11:48    阅读次数:183
EularProject 41:最长的n位Pandigital素数问题
Pandigital prime Problem 41 We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 ...
分类:其他好文   时间:2018-01-24 13:55:17    阅读次数:151
129. Sum Root to Leaf Numbers
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 ...
分类:其他好文   时间:2018-01-23 22:12:05    阅读次数:204
day5-Python学习笔记(十一)random模块,时间模块,加密模块
import random,string# print(random.randint(1,199))#1-199随机取一个整数# print(string.digits) #所有的数字0-9# print(string.ascii_lowercase) #所有的小写字母# print(string. ...
分类:编程语言   时间:2018-01-23 00:47:18    阅读次数:208
1005. Spell It Right (20)
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 ...
分类:其他好文   时间:2018-01-21 00:00:55    阅读次数:208
1001. A+B Format (20)
Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less t ...
分类:其他好文   时间:2018-01-20 19:49:23    阅读次数:166
2164条   上一页 1 ... 53 54 55 56 57 ... 217 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!