码迷,mamicode.com
首页 >  
搜索关键字:guess    ( 609个结果
[LeetCode] Guess Number Higher or Lower
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 ...
分类:其他好文   时间:2016-07-13 13:45:53    阅读次数:113
UVa 1612 Guess (贪心+题意)
题意:有 n 位选手参加编程比赛。比赛有3道题目,每个选手的每道题目都有一个评测之前的预得分(这个分数和选手提交程序的时间相关,提交的越早,预得分越大)。 接下来 是系统评测。如果某道题未通过测试,则改题的实际得分为0分,否则得分等于预得分。得分相同的选手,ID小的排在前面。 问是否能给出所有3n个 ...
分类:其他好文   时间:2016-06-26 19:42:42    阅读次数:141
python入门基础教程随笔4-python数据结构-控制流 if for
# encoding:utf-8number = 69guess = int(input('请输入一个整数:'))# print('你猜的数字是:' +str(guess)) if guess == number: print('恭喜你,你猜对了') # elif guess < number:# ...
分类:编程语言   时间:2016-06-19 22:58:15    阅读次数:205
【Leetcode】Bulls and Cows
题目链接:https://leetcode.com/problems/bulls-and-cows/ 题目: You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number ...
分类:其他好文   时间:2016-06-10 11:11:02    阅读次数:198
猜年龄
#!/usr/bin/env python#author:leiage = 22counter = 0for i in range(10): if counter <3: guess_age = int (input("input guess_age")) if guess_age > age: p ...
分类:其他好文   时间:2016-05-13 09:02:13    阅读次数:121
flask笔记:4:web表单
处理web表单表单需要Flask-WTF 在根目录创建一个配置文件 myblog/config.py CSRF_ENABLED=True SECRET_KEY='you-will-never-guess' CSRF_ENABLED配置是为了激活跨站点请求伪造保护 SECRET_KEY是当CSRF激活后,建立一个加密令牌,用于验证表单 修改app/__init__.py...
分类:Web程序   时间:2016-05-12 15:11:03    阅读次数:220
flask笔记:5:数据库
linux和mac下需要将项目文件夹赋予权限,不然不能执行 flask中使用Flask-SQLAlchemy扩展来管理程序数据。 修改配置文件 myblog/config.py CSRF_ENABLED=True SECRET_KEY='you-will-never-guess' import os basedir = os.path.abspath(os.path.dirn...
分类:数据库   时间:2016-05-12 14:02:42    阅读次数:174
for循环实现返回上级选择
#!/usr/bin/envpython #-*-coding:utf-8-*- #Author:AlexLi age=22 counter=0 foriinrange(10): print(‘-->counter:‘,counter) ifcounter<3: guess_num=int(input("inputyourguessnum:")) ifguess_num==age: print("Congratulations!yougotit.") break#不往后走了,跳出..
分类:其他好文   时间:2016-05-10 23:56:14    阅读次数:411
Reading Effictive java: static member class (SMC) and nonstatic member class(NSC)
Misunderstanding of static member class : For most programmers, comparing to SMC ,we may be more familiar with static field . so we may analogously guess how SMC works according to static field's fea...
分类:编程语言   时间:2016-05-07 10:52:07    阅读次数:219
SICP 1.6-1.8
1.6由于scheme应用序求值的性质,该函数会陷入循环(一直计算 improve guess x)1.7值过小,0.001这个精度远远不够...值过大,由于浮点数精度有限,(比如使用IEEE754浮点数标准, 32位浮点数表示123456789这样的数会有严重的精度丢失), 所以无法得出正确求两个 ...
分类:其他好文   时间:2016-05-01 13:33:44    阅读次数:166
609条   上一页 1 ... 43 44 45 46 47 ... 61 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!