常用字符串常量:string.digits:包含数字0~9的字符串string.letters:包含所有字母(大写或小写字符串,在python3.0中,使用string.ascii-letters代替)string.lowercase:包含所有小写字母的字符串string.printable:包含所有可打印字符的字符串string.punctuation:包含所有..
分类:
编程语言 时间:
2017-04-20 11:59:45
阅读次数:
199
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp ...
分类:
其他好文 时间:
2017-04-17 16:48:13
阅读次数:
149
https://vjudge.net/problem/CodeForces-43B 时间限制 2000ms 内存限制 256MB 题目表述比较啰嗦,大意就是能不能用给定的字符串S1中的所有字符构成另一个字符串S2。只需要统计S1中每个字符出现的频率次数,在构造第二个串S2时,判断由S1提供的字符够不 ...
分类:
其他好文 时间:
2017-04-15 19:18:08
阅读次数:
154
原题链接在这里:https://leetcode.com/problems/valid-word-abbreviation/#/description 题目: Given a non-empty string s and an abbreviation abbr, return whether th ...
分类:
其他好文 时间:
2017-04-11 10:00:14
阅读次数:
150
//主要是数组的scanf用法和strlen sizeof 的区别#include<stdio.h>#define DENSITY 62.4int main(void){ float weight ,volume; int size ,letters; char name[40]; printf(" ...
分类:
其他好文 时间:
2017-04-10 22:20:13
阅读次数:
373
A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded messag ...
分类:
其他好文 时间:
2017-04-10 16:34:00
阅读次数:
174
题目链接:CodeForces - 91A Newspaper Headline 官方题解: In this problem letters from s1 should be taken greedily: take the left letter from the right of the la... ...
分类:
其他好文 时间:
2017-04-05 21:34:53
阅读次数:
357
Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at ...
分类:
其他好文 时间:
2017-04-02 19:22:37
阅读次数:
154
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp ...
分类:
其他好文 时间:
2017-03-30 22:28:51
阅读次数:
165
Given a 2D board and a list of words from the dictionary, find all words in the board. Each word must be constructed from letters of sequentially adja ...
分类:
编程语言 时间:
2017-03-28 19:00:49
阅读次数:
280