码迷,mamicode.com
首页 >  
搜索关键字:letters    ( 1345个结果
leetcode-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 ...
分类:其他好文   时间:2018-06-07 19:18:44    阅读次数:170
[LeetCode] Number of Lines To Write String
We are to write the letters of a given string S, from left to right into lines. Each line has maximum width 100 units, and if writing a letter would c ...
分类:其他好文   时间:2018-06-07 10:24:18    阅读次数:160
字符串常用方法
name = 'The Apple'print(name.capitalize()) #把字符串首字母大写print(name.center(100,'-')) #把字符串居中的print(name.index('p'))#找不到下标的时候会报错print(name.isalnum()) #只能有英 ...
分类:其他好文   时间:2018-06-06 21:48:50    阅读次数:111
Educational Codeforces Round 41 (Rated for Div. 2) F. k-substrings
F. k-substrings time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output F. k-substrings time lim ...
分类:其他好文   时间:2018-06-06 21:47:20    阅读次数:147
python字符串、字典操作,文件读写
一、字符串操作:name = 'aabc,dddd,a'name1 = 'q '# print(name[3]) #字符串也可以取下标# print(name.capitalize()) #把字符串首字母大写# print(name.center(11,'*')) #把name放中间,字符串少于11 ...
分类:编程语言   时间:2018-06-03 23:27:36    阅读次数:295
leetcode-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 th ...
分类:其他好文   时间:2018-06-02 14:56:23    阅读次数:199
CF978C Letters【前缀和+二分查找/几房几号】
【链接】: " CF978C " 【分析】:在前缀和数组种二分找到 =询问数的位置,根据位置就好操作了 【代码】: include using namespace std; const int INF = 0x3f3f3f3f; define ll long long define ms(a,b) ...
分类:其他好文   时间:2018-06-02 11:32:38    阅读次数:161
LeetCode第[91]题(Java):Decode Ways(解码方法数)
题目:解码方法数 难度:Medium 题目内容: A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 2 ...
分类:编程语言   时间:2018-05-30 01:24:09    阅读次数:327
6486: An Ordinary Game(规律)
题目描述 There is a string s of length 3 or greater. No two neighboring characters in s are equal.Takahashi and Aoki will play a game against each other. ...
分类:其他好文   时间:2018-05-29 20:41:11    阅读次数:243
49 字符大小写排序
原题网址:https://www.lintcode.com/problem/sort-letters-by-case/description 描述 给定一个只包含字母的字符串,按照先小写字母后大写字母的顺序进行排序。 描述 描述 给定一个只包含字母的字符串,按照先小写字母后大写字母的顺序进行排序。 ...
分类:编程语言   时间:2018-05-28 21:48:20    阅读次数:217
1345条   上一页 1 ... 31 32 33 34 35 ... 135 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!