Div1 300 RectangularGrid 题意:给定一个长方形,问包含有多少不是正方形的小长方形 题解:枚举小长方形的长宽即可 Div1 600 Masterbrain 题意:略 题解:主要是卡题意,以及“No digit in either a guess or a secret comb ...
分类:
其他好文 时间:
2016-09-03 00:57:31
阅读次数:
282
1.关于tries+=1,在python中,语句块不会单独引进新的作用域,tries还是全局变量,while中改变tries会使tries变量的值改变。 2.逻辑判断。(1)guess!=secret并且tries<6.(2)guess==secret,(3)tries>=6。当(1)不满足时,有( ...
分类:
其他好文 时间:
2016-08-21 12:29:58
阅读次数:
167
问题链接:UVA489 Hangman Judge。
问题简述:参见原题链接。
问题分析:这是一个模拟题。
程序中,定义了若干宏定义,使得程序可阅读性增强。函数guess()中的逻辑做了适当的改进,更加合理快速。
AC的C语言程序如下:
/* UVA489 Hangman Judge */
#include
#include
#define TRUE 1
#de...
分类:
其他好文 时间:
2016-08-11 21:05:31
阅读次数:
146
题目: 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 is. Each ...
分类:
其他好文 时间:
2016-08-10 12:26:32
阅读次数:
134
if用于条件判断,如果满足条件就执行否则就继续直到结束,熟悉shell条件判断就觉得soeasy格式:ifcondition1:executecommandelifcondition2:executecommandelse:executecommandfornincondition:executecommandif示例1:#基于windows版python3.5#!/usr/bin/envpyhon#-*-coding:U..
分类:
编程语言 时间:
2016-08-08 07:43:22
阅读次数:
186
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-08-05 22:53:35
阅读次数:
143
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1562 Problem Description Happy new year to everybody!Now, I want you to guess a minimum number x betww ...
分类:
其他好文 时间:
2016-08-04 09:03:28
阅读次数:
192
题目: 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 ...
分类:
其他好文 时间:
2016-08-02 15:09:46
阅读次数:
168
题目描述: 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 gues ...
分类:
编程语言 时间:
2016-07-31 00:08:44
阅读次数:
302