字符类引用 [[:alnum:]] 字母和数字 [[:alpha:]] 字母[[:blank:]] 仅表示空格和制表符[[:cntrl:]] 控制字符[[:digit:]] 十进制数[[:graph:]] 打印字符,不包含空格[[:lower:]] 小写字母[[:upper:]] 大写字母[[:pr ...
分类:
其他好文 时间:
2016-05-14 01:02:53
阅读次数:
141
湘大OJ地址:http://202.197.224.59/OnlineJudge2/index.php/Problem/read/id/1142
Collatz Conjecture
Time Limit:8000 MS Memory
Limit : 1048536KB
Rightmost Digit
Time Limit:...
分类:
其他好文 时间:
2016-05-13 03:24:14
阅读次数:
185
There is an interesting calculator. It has 3 rows of button.
? Row 1: button 0, 1, 2, 3, … , 9. Pressing each button appends that digit to the end of the display.
? Row 2: button +0, +1, +2, +3, … ,...
分类:
其他好文 时间:
2016-05-13 01:40:51
阅读次数:
142
1、Add Two Numbers——这是leedcode的第二题:
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two num...
分类:
其他好文 时间:
2016-05-13 00:02:34
阅读次数:
394
Description
You are given a car odometer which displays the miles traveled as an integer. The odometer has a defect, however: it proceeds from the digit 3 to the digit 5, always skipping over the dig...
分类:
其他好文 时间:
2016-05-12 16:08:32
阅读次数:
135
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: ...
分类:
其他好文 时间:
2016-05-11 21:39:49
阅读次数:
121
Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N <t ...
分类:
其他好文 时间:
2016-05-09 21:53:58
阅读次数:
251
Add Digits
Total Accepted: 92455 Total
Submissions: 190510 Difficulty: Easy
Given a non-negative integer num, repeatedly
add all its digits until the result has only one digit.
Fo...
分类:
其他好文 时间:
2016-05-07 11:24:50
阅读次数:
137
简介本章依然专注于使用yacc实现计算器,主要的特点是给算术运算增加变量支持。模块拆分它主要分为3个模块
1. lex词法分析器
2. yacc语法分析器
3. 符号表功能描述1. lex词法分析器正规式的定义如下:delim [ \t]
ws {delim}+
letter [a-zA-Z]
digit [0-9]
id {letter}({letter}|{digit})*
/...
分类:
其他好文 时间:
2016-05-07 09:52:10
阅读次数:
252