1 # -*- coding:utf-8 -*- 2 import random 3 4 # best of three 5 def finger_guess(): 6 rule = {1:'rock', 2:'paper', 3:'scissor'} 7 win_way = [['rock', '... ...
分类:
编程语言 时间:
2017-03-09 17:09:45
阅读次数:
516
错误重现: 在导入Excel读取数据时,其中的一个字段保存的值有如下格式:"2011072014","20110Aad10","25124Adfa","例子asdfadf" 这样的 混合了 "字母/数字/中文"数据, 在Excel表格中的前 8条 或 前 8+ 条数据中的 这个列中的数据都是 由纯数 ...
/*简单猜数游戏,magic number#2,版本*/#include<stdio.h>#include<stdlib.h> int main(void){ int magic; /*magic number*/ int guess; /*user's guess*/ printf("\nWelc ...
分类:
其他好文 时间:
2017-03-03 23:01:27
阅读次数:
188
/*简单猜数游戏,magic number#1,版本*/#include<stdio.h>#include<stdlib.h> int main(void){ int magic; /*magic number*/ int guess; /*user's guess*/ printf("\nWelc ...
分类:
其他好文 时间:
2017-03-03 22:35:52
阅读次数:
176
We are playing the Guess Game. The game is as follows: I pick a number from 1 to n. You have to guess which number I picked. Every time you guess wron ...
分类:
其他好文 时间:
2017-02-28 13:48:26
阅读次数:
202
之前的文章中判断txt的编码,发现utf-8无BOM编码格式无法检测出来。 当无法检测时(返回的code为空时),再使用一下方法则可以了。 ...
分类:
编程语言 时间:
2017-02-20 10:46:17
阅读次数:
188
题意:有n(n<=16384)位选手参加编程比赛。比赛有3道题目,每个选手的每道题目都有一个评测之前的预得分(这个分数和选手提交程序的时间相关,提交得越早,预得分越大)。接下来是系统测试。如果某道题目未通过测试,则该题的实际得分为0分,否则得分等于预得分。得分相同的选手,ID小的排在前面。 已知所有 ...
分类:
其他好文 时间:
2017-02-09 15:46:58
阅读次数:
192
原题链接在这里:https://leetcode.com/problems/guess-number-higher-or-lower-ii/ 题目: We are playing the Guess Game. The game is as follows: I pick a number from ...
分类:
其他好文 时间:
2017-01-27 09:26:13
阅读次数:
182
原题链接在这里:https://leetcode.com/problems/guess-number-higher-or-lower/ 题目: We are playing the Guess Game. The game is as follows: I pick a number from 1 ...
分类:
其他好文 时间:
2017-01-26 09:51:53
阅读次数:
164
今天,试着做了一下LeetCode OJ上面的第375道题:Guess Number Higher or Lower II 原题链接:https://leetcode.com/problems/guess-number-higher-or-lower-ii/ 具体题目如下: We are playi ...
分类:
其他好文 时间:
2017-01-05 01:38:35
阅读次数:
238