码迷,mamicode.com
首页 >  
搜索关键字:letters    ( 1345个结果
383. Ransom Note
Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans ...
分类:其他好文   时间:2017-03-25 19:46:01    阅读次数:130
409. Longest Palindrome
题目: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. ...
分类:其他好文   时间:2017-03-24 10:32:02    阅读次数:125
用python生成指定位数的密码
#!/usr/bin/envpython#coding:utf8#随机生成8位、20位、10位密码importrandomimportstringall_chs=string.letters+string.digitsdefgen_pass(num=8):pwd=‘‘#num=int(raw_input(‘numer:‘))foriinrange(num):mima=random.choice(all_chs)pwd+=mimareturnpwdif__name__==‘__main__..
分类:编程语言   时间:2017-03-21 13:21:25    阅读次数:179
python判断参数是否是合法标识符
importstringdefis_valid_identifier(param):alphas=string.letters+‘_‘nums=string.digitsiflen(param)>1:ifparam[0]notinalphas:print‘invalid:firstsymbolmustbealphabetic‘else:forotherCharinparam[1:]:ifotherCharnotinalphas+nums:print‘invalid:remindingsymbolsmus..
分类:编程语言   时间:2017-03-20 19:44:42    阅读次数:387
Leetcode——438. Find All Anagrams in a String【java】
第一反应感觉是排列组合及字符匹配问题 【既不是可重复排列,有可能不是全排列】 ...
分类:编程语言   时间:2017-03-15 12:48:52    阅读次数:224
[leetcode DP]91. Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:其他好文   时间:2017-03-13 15:11:13    阅读次数:172
91. Decode Ways
A message containing letters from A-Z is being encoded to numbers using the following mapping: Given an encoded message containing digits, determine t ...
分类:其他好文   时间:2017-03-13 13:31:18    阅读次数:129
[SPOJ8222]Substrings
[SPOJ8222]Substrings 试题描述 You are given a string S which consists of 250000 lowercase latin letters at most. We define F(x) as the maximal number of t ...
分类:其他好文   时间:2017-03-13 11:17:35    阅读次数:210
猜单词小游戏
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Diagnostics; namespace GuessWord{ class ...
分类:其他好文   时间:2017-03-11 12:47:36    阅读次数:155
zoj 2744 Palindromes
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome becau ...
分类:其他好文   时间:2017-03-10 13:12:58    阅读次数:270
1345条   上一页 1 ... 60 61 62 63 64 ... 135 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!