码迷,mamicode.com
首页 >  
搜索关键字:guess    ( 609个结果
for与break的用法
# Auther: Aaron Fanage_of_oldboy = 56#执行3次循环for i in range(3): guess_age = int(input("猜一下oldboy的年纪: ")) if guess_age == age_of_oldboy: print("好的,你猜对了" ...
分类:其他好文   时间:2016-11-12 19:57:14    阅读次数:234
python3-while与if
# Auther: Aaron Fanage_of_oldboy = 56#定义一个while循环的起始判断值countcount = 0#当count小于3的情况下一直执行while循环while count < 3: guess_age = int(input("猜一下oldboy的年纪: ") ...
分类:编程语言   时间:2016-11-12 19:44:23    阅读次数:158
2016ACM/ICPC亚洲区沈阳站-重现赛
C.Recursive sequence 求ans(x),ans(1)=a,ans(2)=b,ans(n)=ans(n-2)*2+ans(n-1)+n^4 如果直接就去解。。。很难,毕竟不是那种可以直接化成矩阵的格式,我们也因为这个被卡很长时间 事实上可以把这道式子化成几个基本元素的格式,然后就容易 ...
分类:其他好文   时间:2016-11-08 07:37:15    阅读次数:332
实现让用户不断的猜年龄,但只给最多3次机会,超过次数猜不对就退出程序。
#!/usr/bin/env python# -*- coding: utf-8 -*-# __author__ = "Sandu"my_age = 27count = 0while count < 3: guess_age = int(input("请输入您猜的年龄:")) count += 1 ...
分类:其他好文   时间:2016-11-05 14:45:31    阅读次数:160
05.for循环语句
#!/usr/bin/env python #coding:utf8 #Author:Felix zheng age_of_felix = 32 count = 0 for i in range(3): guess_age = int(input("guess age:")) if guess_ag ...
分类:其他好文   时间:2016-11-04 13:41:33    阅读次数:159
375. Guess Number Higher or Lower II
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-10-24 07:45:45    阅读次数:285
好,开始没做出来 guess-number-higher-or-lower-ii
https://leetcode.com/mockinterview/session/result/xsicjnm/ https://leetcode.com/problems/guess-number-higher-or-lower-ii/ ...
分类:其他好文   时间:2016-10-23 15:04:48    阅读次数:228
uva 11995 I Can Guess the Data Structure!
There is a bag-like data structure, supporting two operations: 1 x Throw an element x into the bag. 2 Take out an element from the bag. Given a sequen ...
分类:其他好文   时间:2016-10-23 14:11:43    阅读次数:308
UVA 1995 I can guess the structer
模 拟 ...
分类:其他好文   时间:2016-10-23 14:07:37    阅读次数:169
Python day2
流程控制 if...elif...else 判断 基本语法 实例 #!/bin/usr/env python bzjxs = 18 age = int(input("Guess how old I am:")) if bzjxs > age: print("The big guess") elif ...
分类:编程语言   时间:2016-10-17 23:10:00    阅读次数:233
609条   上一页 1 ... 39 40 41 42 43 ... 61 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!